[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.15 and 1.16

version 1.15, 2019/07/14 03:30:46 version 1.16, 2022/01/10 12:17:49
Line 66 
Line 66 
 #include <openssl/pem.h>  #include <openssl/pem.h>
   
 static struct {  static struct {
           int check;
         const EVP_CIPHER *cipher;          const EVP_CIPHER *cipher;
         char *infile;          char *infile;
         int informat;          int informat;
Line 74 
Line 75 
         int outformat;          int outformat;
         char *passargin;          char *passargin;
         char *passargout;          char *passargout;
           int pubcheck;
         int pubin;          int pubin;
         int pubout;          int pubout;
         int pubtext;          int pubtext;
Line 99 
Line 101 
   
 static const struct option pkey_options[] = {  static const struct option pkey_options[] = {
         {          {
                   .name = "check",
                   .desc = "Check validity of key",
                   .type = OPTION_FLAG,
                   .opt.flag = &pkey_config.check,
           },
           {
                 .name = "in",                  .name = "in",
                 .argname = "file",                  .argname = "file",
                 .desc = "Input file (default stdin)",                  .desc = "Input file (default stdin)",
Line 147 
Line 155 
                 .opt.arg = &pkey_config.passargout,                  .opt.arg = &pkey_config.passargout,
         },          },
         {          {
                   .name = "pubcheck",
                   .desc = "Check validity of public key",
                   .type = OPTION_FLAG,
                   .opt.flag = &pkey_config.pubcheck,
           },
           {
                 .name = "pubin",                  .name = "pubin",
                 .desc = "Expect a public key (default private key)",                  .desc = "Expect a public key (default private key)",
                 .type = OPTION_VALUE,                  .type = OPTION_VALUE,
Line 186 
Line 200 
         int n = 0;          int n = 0;
   
         fprintf(stderr,          fprintf(stderr,
             "usage: pkey [-ciphername] [-in file] [-inform fmt] [-noout] "              "usage: pkey [-check] [-ciphername] [-in file] [-inform fmt] "
             "[-out file]\n"              "[-noout] [-out file]\n"
             "    [-outform fmt] [-passin src] [-passout src] [-pubin] "              "    [-outform fmt] [-passin src] [-passout src] [-pubcheck] "
             "[-pubout] [-text]\n"              "[-pubin] [-pubout]\n"
             "    [-text_pub]\n\n");              "    [-text] [-text_pub]\n\n");
         options_usage(pkey_options);          options_usage(pkey_options);
         fprintf(stderr, "\n");          fprintf(stderr, "\n");
   
Line 251 
Line 265 
                     pkey_config.informat, 1, passin, "key");                      pkey_config.informat, 1, passin, "key");
         if (!pkey)          if (!pkey)
                 goto end;                  goto end;
   
   #if notyet
           if (pkey_config.check) {
                   if (!pkey_check(out, pkey, EVP_PKEY_check, "Key pair"))
                           goto end;
           } else if (pkey_config.pubcheck) {
                   if (!pkey_check(out, pkey, EVP_PKEY_public_check, "Public key"))
                           goto end;
           }
   #endif
   
         if (!pkey_config.noout) {          if (!pkey_config.noout) {
                 if (pkey_config.outformat == FORMAT_PEM) {                  if (pkey_config.outformat == FORMAT_PEM) {

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16