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

Diff for /src/usr.bin/openssl/req.c between version 1.20 and 1.21

version 1.20, 2021/10/22 09:44:30 version 1.21, 2021/10/23 11:36:44
Line 143 
Line 143 
         char *keyfile;          char *keyfile;
         int keyform;          int keyform;
         char *keyout;          char *keyout;
         int kludge;  
         int modulus;          int modulus;
         int multirdn;          int multirdn;
         int newhdr;          int newhdr;
Line 296 
Line 295 
                 .opt.argfunc = req_opt_addext,                  .opt.argfunc = req_opt_addext,
         },          },
         {          {
                 .name = "asn1-kludge",  
                 .type = OPTION_VALUE,  
                 .opt.value = &req_config.kludge,  
                 .value = 1,  
         },  
         {  
                 .name = "batch",                  .name = "batch",
                 .desc = "Operate in batch mode",                  .desc = "Operate in batch mode",
                 .type = OPTION_FLAG,                  .type = OPTION_FLAG,
Line 402 
Line 395 
                 .opt.argfunc = req_opt_newkey,                  .opt.argfunc = req_opt_newkey,
         },          },
         {          {
                 .name = "no-asn1-kludge",  
                 .type = OPTION_VALUE,  
                 .opt.value = &req_config.kludge,  
                 .value = 0,  
         },  
         {  
                 .name = "nodes",                  .name = "nodes",
                 .desc = "Do not encrypt output private key",                  .desc = "Do not encrypt output private key",
                 .type = OPTION_FLAG,                  .type = OPTION_FLAG,
Line 544 
Line 531 
 req_usage(void)  req_usage(void)
 {  {
         fprintf(stderr,          fprintf(stderr,
             "usage: req [-addext ext] [-asn1-kludge] [-batch] [-config file]\n"              "usage: req [-addext ext] [-batch] [-config file]\n"
             "    [-days n] [-extensions section] [-in file]\n"              "    [-days n] [-extensions section] [-in file]\n"
             "    [-inform der | pem] [-key keyfile] [-keyform der | pem]\n"              "    [-inform der | pem] [-key keyfile] [-keyform der | pem]\n"
             "    [-keyout file] [-md4 | -md5 | -sha1] [-modulus]\n"              "    [-keyout file] [-md4 | -md5 | -sha1] [-modulus]\n"
             "    [-multivalue-rdn] [-nameopt option] [-new] [-newhdr]\n"              "    [-multivalue-rdn] [-nameopt option] [-new] [-newhdr]\n"
             "    [-newkey arg] [-no-asn1-kludge] [-nodes] [-noout]\n"              "    [-newkey arg] [-nodes] [-noout]\n"
             "    [-out file] [-outform der | pem] [-passin arg]\n"              "    [-out file] [-outform der | pem] [-passin arg]\n"
             "    [-passout arg] [-pkeyopt opt:value] [-pubkey]\n"              "    [-passout arg] [-pkeyopt opt:value] [-pubkey]\n"
             "    [-reqexts section] [-reqopt option] [-set_serial n]\n"              "    [-reqexts section] [-reqopt option] [-set_serial n]\n"
Line 851 
Line 838 
                 BIO_printf(bio_err, "-----\n");                  BIO_printf(bio_err, "-----\n");
         }          }
         if (!req_config.newreq) {          if (!req_config.newreq) {
                 /*  
                  * Since we are using a pre-existing certificate request, the  
                  * kludge 'format' info should not be changed.  
                  */  
                 req_config.kludge = -1;  
                 if (req_config.infile == NULL)                  if (req_config.infile == NULL)
                         BIO_set_fp(in, stdin, BIO_NOCLOSE);                          BIO_set_fp(in, stdin, BIO_NOCLOSE);
                 else {                  else {
Line 890 
Line 872 
                         }                          }
                         i = make_REQ(req, pkey, req_config.subj, req_config.multirdn, !req_config.x509, req_config.chtype);                          i = make_REQ(req, pkey, req_config.subj, req_config.multirdn, !req_config.x509, req_config.chtype);
                         req_config.subj = NULL; /* done processing '-subj' option */                          req_config.subj = NULL; /* done processing '-subj' option */
                         if ((req_config.kludge > 0) && !sk_X509_ATTRIBUTE_num(req->req_info->attributes)) {  
                                 sk_X509_ATTRIBUTE_free(req->req_info->attributes);  
                                 req->req_info->attributes = NULL;  
                         }  
                         if (!i) {                          if (!i) {
                                 BIO_printf(bio_err, "problems making Certificate Request\n");                                  BIO_printf(bio_err, "problems making Certificate Request\n");
                                 goto end;                                  goto end;

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21