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

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

version 1.4, 2015/08/19 18:25:31 version 1.5, 2015/09/11 14:30:23
Line 75 
Line 75 
   
 static struct {  static struct {
         char *challenge;          char *challenge;
 #ifndef OPENSSL_NO_ENGINE  
         char *engine;  
 #endif  
         char *infile;          char *infile;
         char *keyfile;          char *keyfile;
         int noout;          int noout;
Line 97 
Line 94 
                 .type = OPTION_ARG,                  .type = OPTION_ARG,
                 .opt.arg = &spkac_config.challenge,                  .opt.arg = &spkac_config.challenge,
         },          },
 #ifndef OPENSSL_NO_ENGINE  
         {          {
                 .name = "engine",  
                 .argname = "id",  
                 .desc = "Use the engine specified by the given identifier",  
                 .type = OPTION_ARG,  
                 .opt.arg = &spkac_config.engine,  
         },  
 #endif  
         {  
                 .name = "in",                  .name = "in",
                 .argname = "file",                  .argname = "file",
                 .desc = "Input file (default stdin)",                  .desc = "Input file (default stdin)",
Line 174 
Line 162 
 spkac_usage(void)  spkac_usage(void)
 {  {
         fprintf(stderr,          fprintf(stderr,
             "usage: spkac [-challenge string] [-engine id] [-in file] "              "usage: spkac [-challenge string] [-in file] "
             "[-key file] [-noout]\n"              "[-key file] [-noout]\n"
             "    [-out file] [-passin src] [-pubkey] [-spkac name] "              "    [-out file] [-passin src] [-pubkey] [-spkac name] "
             "[-spksect section]\n"              "[-spksect section]\n"
Line 185 
Line 173 
 int  int
 spkac_main(int argc, char **argv)  spkac_main(int argc, char **argv)
 {  {
         ENGINE *e = NULL;  
         int i, ret = 1;          int i, ret = 1;
         BIO *in = NULL, *out = NULL;          BIO *in = NULL, *out = NULL;
         char *passin = NULL;          char *passin = NULL;
Line 207 
Line 194 
                 BIO_printf(bio_err, "Error getting password\n");                  BIO_printf(bio_err, "Error getting password\n");
                 goto end;                  goto end;
         }          }
 #ifndef OPENSSL_NO_ENGINE  
         e = setup_engine(bio_err, spkac_config.engine, 0);  
 #endif  
   
         if (spkac_config.keyfile) {          if (spkac_config.keyfile) {
                 pkey = load_key(bio_err,                  pkey = load_key(bio_err,
                     strcmp(spkac_config.keyfile, "-") ? spkac_config.keyfile                      strcmp(spkac_config.keyfile, "-") ? spkac_config.keyfile
                     : NULL, FORMAT_PEM, 1, passin, e, "private key");                      : NULL, FORMAT_PEM, 1, passin, "private key");
                 if (!pkey) {                  if (!pkey) {
                         goto end;                          goto end;
                 }                  }

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