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

Diff for /src/usr.bin/openssl/smime.c between version 1.11 and 1.12

version 1.11, 2022/01/11 14:23:05 version 1.12, 2022/01/11 14:35:14
Line 69 
Line 69 
 #include <openssl/x509_vfy.h>  #include <openssl/x509_vfy.h>
 #include <openssl/x509v3.h>  #include <openssl/x509v3.h>
   
 static int save_certs(char *signerfile, STACK_OF(X509) * signers);  static int save_certs(char *signerfile, STACK_OF(X509) *signers);
 static int smime_cb(int ok, X509_STORE_CTX * ctx);  static int smime_cb(int ok, X509_STORE_CTX *ctx);
   
 #define SMIME_OP        0x10  #define SMIME_OP        0x10
 #define SMIME_IP        0x20  #define SMIME_IP        0x20
Line 715 
Line 715 
         X509_STORE *store = NULL;          X509_STORE *store = NULL;
         X509 *cert = NULL, *recip = NULL, *signer = NULL;          X509 *cert = NULL, *recip = NULL, *signer = NULL;
         EVP_PKEY *key = NULL;          EVP_PKEY *key = NULL;
         STACK_OF(X509) * encerts = NULL, *other = NULL;          STACK_OF(X509) *encerts = NULL, *other = NULL;
         BIO *in = NULL, *out = NULL, *indata = NULL;          BIO *in = NULL, *out = NULL, *indata = NULL;
         int badarg = 0;          int badarg = 0;
         char *passin = NULL;          char *passin = NULL;
Line 967 
Line 967 
                         goto end;                          goto end;
                 }                  }
         } else if (smime_config.operation == SMIME_VERIFY) {          } else if (smime_config.operation == SMIME_VERIFY) {
                 STACK_OF(X509) * signers;                  STACK_OF(X509) *signers;
                 if (PKCS7_verify(p7, other, store, indata, out, smime_config.flags))                  if (PKCS7_verify(p7, other, store, indata, out, smime_config.flags))
                         BIO_printf(bio_err, "Verification successful\n");                          BIO_printf(bio_err, "Verification successful\n");
                 else {                  else {
Line 1029 
Line 1029 
 }  }
   
 static int  static int
 save_certs(char *signerfile, STACK_OF(X509) * signers)  save_certs(char *signerfile, STACK_OF(X509) *signers)
 {  {
         int i;          int i;
         BIO *tmp;          BIO *tmp;
   
         if (!signerfile)          if (!signerfile)
                 return 1;                  return 1;
         tmp = BIO_new_file(signerfile, "w");          tmp = BIO_new_file(signerfile, "w");
Line 1041 
Line 1042 
         for (i = 0; i < sk_X509_num(signers); i++)          for (i = 0; i < sk_X509_num(signers); i++)
                 PEM_write_bio_X509(tmp, sk_X509_value(signers, i));                  PEM_write_bio_X509(tmp, sk_X509_value(signers, i));
         BIO_free(tmp);          BIO_free(tmp);
   
         return 1;          return 1;
 }  }
   
   
 /* Minimal callback just to output policy info (if any) */  /* Minimal callback just to output policy info (if any) */
   
 static int  static int
 smime_cb(int ok, X509_STORE_CTX * ctx)  smime_cb(int ok, X509_STORE_CTX *ctx)
 {  {
         int error;          int error;
   
Line 1061 
Line 1061 
         policies_print(NULL, ctx);          policies_print(NULL, ctx);
   
         return ok;          return ok;
   
 }  }
   

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12