[BACK]Return to pkcs8.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / openssl

Diff for /src/usr.bin/openssl/pkcs8.c between version 1.5 and 1.6

version 1.5, 2015/08/19 18:25:31 version 1.6, 2015/09/11 14:30:23
Line 69 
Line 69 
   
 static struct {  static struct {
         const EVP_CIPHER *cipher;          const EVP_CIPHER *cipher;
 #ifndef OPENSSL_NO_ENGINE  
         char *engine;  
 #endif  
         char *infile;          char *infile;
         int informat;          int informat;
         int iter;          int iter;
Line 115 
Line 112 
                 .value = PKCS8_EMBEDDED_PARAM,                  .value = PKCS8_EMBEDDED_PARAM,
                 .opt.value = &pkcs8_config.p8_broken,                  .opt.value = &pkcs8_config.p8_broken,
         },          },
 #ifndef OPENSSL_NO_ENGINE  
         {          {
                 .name = "engine",  
                 .argname = "id",  
                 .desc = "Use the engine specified by the given identifier",  
                 .type = OPTION_ARG,  
                 .opt.arg = &pkcs8_config.engine,  
         },  
 #endif  
         {  
                 .name = "in",                  .name = "in",
                 .argname = "file",                  .argname = "file",
                 .desc = "Input file (default stdin)",                  .desc = "Input file (default stdin)",
Line 220 
Line 208 
 static void  static void
 pkcs8_usage()  pkcs8_usage()
 {  {
         fprintf(stderr, "usage: pkcs8 [-embed] [-engine id] [-in file] "          fprintf(stderr, "usage: pkcs8 [-embed] [-in file] "
             "[-inform fmt] [-nocrypt]\n"              "[-inform fmt] [-nocrypt]\n"
             "    [-noiter] [-nooct] [-nsdb] [-out file] [-outform fmt] "              "    [-noiter] [-nooct] [-nsdb] [-out file] [-outform fmt] "
             "[-passin src]\n"              "[-passin src]\n"
Line 231 
Line 219 
 int  int
 pkcs8_main(int argc, char **argv)  pkcs8_main(int argc, char **argv)
 {  {
         ENGINE *e = NULL;  
         BIO *in = NULL, *out = NULL;          BIO *in = NULL, *out = NULL;
         X509_SIG *p8 = NULL;          X509_SIG *p8 = NULL;
         PKCS8_PRIV_KEY_INFO *p8inf = NULL;          PKCS8_PRIV_KEY_INFO *p8inf = NULL;
Line 252 
Line 239 
                 return (1);                  return (1);
         }          }
   
 #ifndef OPENSSL_NO_ENGINE  
         e = setup_engine(bio_err, pkcs8_config.engine, 0);  
 #endif  
   
         if (!app_passwd(bio_err, pkcs8_config.passargin,          if (!app_passwd(bio_err, pkcs8_config.passargin,
             pkcs8_config.passargout, &passin, &passout)) {              pkcs8_config.passargout, &passin, &passout)) {
                 BIO_printf(bio_err, "Error getting passwords\n");                  BIO_printf(bio_err, "Error getting passwords\n");
Line 285 
Line 268 
         }          }
         if (pkcs8_config.topk8) {          if (pkcs8_config.topk8) {
                 pkey = load_key(bio_err, pkcs8_config.infile,                  pkey = load_key(bio_err, pkcs8_config.infile,
                     pkcs8_config.informat, 1, passin, e, "key");                      pkcs8_config.informat, 1, passin, "key");
                 if (!pkey)                  if (!pkey)
                         goto end;                          goto end;
                 if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey,                  if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey,

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6