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

Diff for /src/usr.bin/openssl/pkey.c between version 1.4 and 1.5

version 1.4, 2015/08/22 16:36:05 version 1.5, 2015/09/11 14:30:23
Line 68 
Line 68 
 int  int
 pkey_main(int argc, char **argv)  pkey_main(int argc, char **argv)
 {  {
         ENGINE *e = NULL;  
         char **args, *infile = NULL, *outfile = NULL;          char **args, *infile = NULL, *outfile = NULL;
         char *passargin = NULL, *passargout = NULL;          char *passargin = NULL, *passargout = NULL;
         BIO *in = NULL, *out = NULL;          BIO *in = NULL, *out = NULL;
Line 78 
Line 77 
         EVP_PKEY *pkey = NULL;          EVP_PKEY *pkey = NULL;
         char *passin = NULL, *passout = NULL;          char *passin = NULL, *passout = NULL;
         int badarg = 0;          int badarg = 0;
 #ifndef OPENSSL_NO_ENGINE  
         char *engine = NULL;  
 #endif  
         int ret = 1;          int ret = 1;
   
         informat = FORMAT_PEM;          informat = FORMAT_PEM;
Line 109 
Line 105 
                                 goto bad;                                  goto bad;
                         passargout = *(++args);                          passargout = *(++args);
                 }                  }
 #ifndef OPENSSL_NO_ENGINE  
                 else if (strcmp(*args, "-engine") == 0) {  
                         if (!args[1])  
                                 goto bad;  
                         engine = *(++args);  
                 }  
 #endif  
                 else if (!strcmp(*args, "-in")) {                  else if (!strcmp(*args, "-in")) {
                         if (args[1]) {                          if (args[1]) {
                                 args++;                                  args++;
Line 162 
Line 151 
                 BIO_printf(bio_err, "-outform X      output format (DER or PEM)\n");                  BIO_printf(bio_err, "-outform X      output format (DER or PEM)\n");
                 BIO_printf(bio_err, "-out file       output file\n");                  BIO_printf(bio_err, "-out file       output file\n");
                 BIO_printf(bio_err, "-passout arg    output file pass phrase source\n");                  BIO_printf(bio_err, "-passout arg    output file pass phrase source\n");
 #ifndef OPENSSL_NO_ENGINE  
                 BIO_printf(bio_err, "-engine e       use engine e, possibly a hardware device.\n");  
 #endif  
                 return 1;                  return 1;
         }          }
 #ifndef OPENSSL_NO_ENGINE  
         e = setup_engine(bio_err, engine, 0);  
 #endif  
   
         if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {          if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
                 BIO_printf(bio_err, "Error getting passwords\n");                  BIO_printf(bio_err, "Error getting passwords\n");
Line 187 
Line 170 
   
         if (pubin)          if (pubin)
                 pkey = load_pubkey(bio_err, infile, informat, 1,                  pkey = load_pubkey(bio_err, infile, informat, 1,
                     passin, e, "Public Key");                      passin, "Public Key");
         else          else
                 pkey = load_key(bio_err, infile, informat, 1,                  pkey = load_key(bio_err, infile, informat, 1, passin, "key");
                     passin, e, "key");  
         if (!pkey)          if (!pkey)
                 goto end;                  goto end;
   

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