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

Diff for /src/usr.bin/openssl/dsa.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 76 
Line 76 
   
 static struct {  static struct {
         const EVP_CIPHER *enc;          const EVP_CIPHER *enc;
 #ifndef OPENSSL_NO_ENGINE  
         char *engine;  
 #endif  
         char *infile;          char *infile;
         int informat;          int informat;
         int modulus;          int modulus;
Line 110 
Line 107 
 }  }
   
 static struct option dsa_options[] = {  static struct option dsa_options[] = {
 #ifndef OPENSSL_NO_ENGINE  
         {          {
                 .name = "engine",  
                 .argname = "id",  
                 .desc = "Use the engine specified by the given identifier",  
                 .type = OPTION_ARG,  
                 .opt.arg = &dsa_config.engine,  
         },  
 #endif  
         {  
                 .name = "in",                  .name = "in",
                 .argname = "file",                  .argname = "file",
                 .desc = "Input file (default stdin)",                  .desc = "Input file (default stdin)",
Line 231 
Line 219 
 dsa_usage(void)  dsa_usage(void)
 {  {
         fprintf(stderr,          fprintf(stderr,
             "usage: dsa [-engine id] [-in file] [-inform format] [-noout]\n"              "usage: dsa [-in file] [-inform format] [-noout]\n"
             "    [-out file] [-outform format] [-passin src] [-passout src]\n"              "    [-out file] [-outform format] [-passin src] [-passout src]\n"
             "    [-pubin] [-pubout] [-pvk-none | -pvk-strong | -pvk-weak]\n"              "    [-pubin] [-pubout] [-pvk-none | -pvk-strong | -pvk-weak]\n"
             "    [-text] [-ciphername]\n\n");              "    [-text] [-ciphername]\n\n");
Line 246 
Line 234 
 int  int
 dsa_main(int argc, char **argv)  dsa_main(int argc, char **argv)
 {  {
         ENGINE *e = NULL;  
         int ret = 1;          int ret = 1;
         DSA *dsa = NULL;          DSA *dsa = NULL;
         int i;          int i;
Line 264 
Line 251 
                 goto end;                  goto end;
         }          }
   
 #ifndef OPENSSL_NO_ENGINE  
         e = setup_engine(bio_err, dsa_config.engine, 0);  
 #endif  
   
         if (!app_passwd(bio_err, dsa_config.passargin, dsa_config.passargout,          if (!app_passwd(bio_err, dsa_config.passargin, dsa_config.passargout,
             &passin, &passout)) {              &passin, &passout)) {
                 BIO_printf(bio_err, "Error getting passwords\n");                  BIO_printf(bio_err, "Error getting passwords\n");
Line 296 
Line 279 
   
                 if (dsa_config.pubin)                  if (dsa_config.pubin)
                         pkey = load_pubkey(bio_err, dsa_config.infile,                          pkey = load_pubkey(bio_err, dsa_config.infile,
                             dsa_config.informat, 1, passin, e, "Public Key");                              dsa_config.informat, 1, passin, "Public Key");
                 else                  else
                         pkey = load_key(bio_err, dsa_config.infile,                          pkey = load_key(bio_err, dsa_config.infile,
                             dsa_config.informat, 1, passin, e, "Private Key");                              dsa_config.informat, 1, passin, "Private Key");
   
                 if (pkey) {                  if (pkey) {
                         dsa = EVP_PKEY_get1_DSA(pkey);                          dsa = EVP_PKEY_get1_DSA(pkey);

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