=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/openssl/smime.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/openssl/smime.c 2022/01/11 14:23:05 1.11 --- src/usr.bin/openssl/smime.c 2022/01/11 14:35:14 1.12 *************** *** 1,4 **** ! /* $OpenBSD: smime.c,v 1.11 2022/01/11 14:23:05 inoguchi Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ --- 1,4 ---- ! /* $OpenBSD: smime.c,v 1.12 2022/01/11 14:35:14 inoguchi Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ *************** *** 69,76 **** #include #include ! static int save_certs(char *signerfile, STACK_OF(X509) * signers); ! static int smime_cb(int ok, X509_STORE_CTX * ctx); #define SMIME_OP 0x10 #define SMIME_IP 0x20 --- 69,76 ---- #include #include ! static int save_certs(char *signerfile, STACK_OF(X509) *signers); ! static int smime_cb(int ok, X509_STORE_CTX *ctx); #define SMIME_OP 0x10 #define SMIME_IP 0x20 *************** *** 715,721 **** X509_STORE *store = NULL; X509 *cert = NULL, *recip = NULL, *signer = NULL; EVP_PKEY *key = NULL; ! STACK_OF(X509) * encerts = NULL, *other = NULL; BIO *in = NULL, *out = NULL, *indata = NULL; int badarg = 0; char *passin = NULL; --- 715,721 ---- X509_STORE *store = NULL; X509 *cert = NULL, *recip = NULL, *signer = NULL; EVP_PKEY *key = NULL; ! STACK_OF(X509) *encerts = NULL, *other = NULL; BIO *in = NULL, *out = NULL, *indata = NULL; int badarg = 0; char *passin = NULL; *************** *** 967,973 **** goto end; } } else if (smime_config.operation == SMIME_VERIFY) { ! STACK_OF(X509) * signers; if (PKCS7_verify(p7, other, store, indata, out, smime_config.flags)) BIO_printf(bio_err, "Verification successful\n"); else { --- 967,973 ---- goto end; } } else if (smime_config.operation == SMIME_VERIFY) { ! STACK_OF(X509) *signers; if (PKCS7_verify(p7, other, store, indata, out, smime_config.flags)) BIO_printf(bio_err, "Verification successful\n"); else { *************** *** 1029,1038 **** } static int ! save_certs(char *signerfile, STACK_OF(X509) * signers) { int i; BIO *tmp; if (!signerfile) return 1; tmp = BIO_new_file(signerfile, "w"); --- 1029,1039 ---- } static int ! save_certs(char *signerfile, STACK_OF(X509) *signers) { int i; BIO *tmp; + if (!signerfile) return 1; tmp = BIO_new_file(signerfile, "w"); *************** *** 1041,1054 **** for (i = 0; i < sk_X509_num(signers); i++) PEM_write_bio_X509(tmp, sk_X509_value(signers, i)); BIO_free(tmp); return 1; } - /* Minimal callback just to output policy info (if any) */ - static int ! smime_cb(int ok, X509_STORE_CTX * ctx) { int error; --- 1042,1054 ---- for (i = 0; i < sk_X509_num(signers); i++) PEM_write_bio_X509(tmp, sk_X509_value(signers, i)); BIO_free(tmp); + return 1; } /* Minimal callback just to output policy info (if any) */ static int ! smime_cb(int ok, X509_STORE_CTX *ctx) { int error; *************** *** 1061,1066 **** policies_print(NULL, ctx); return ok; - } - --- 1061,1064 ----