From: Dr. Stephen Henson Date: Wed, 24 Jun 2015 11:28:50 +0000 (+0100) Subject: Don't output bogus errors in PKCS12_parse X-Git-Tag: OpenSSL_1_0_2d~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7c1dae55d476d94c96db68de20670c1066d281b3;p=oweals%2Fopenssl.git Don't output bogus errors in PKCS12_parse PR#3923 Reviewed-by: Tim Hudson (cherry picked from commit ffbf304d4832bd51bb0618f8ca5b7c26647ee664) --- diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c index ee476c38f4..9aa3c90c4e 100644 --- a/crypto/pkcs12/p12_kiss.c +++ b/crypto/pkcs12/p12_kiss.c @@ -135,10 +135,12 @@ int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, while ((x = sk_X509_pop(ocerts))) { if (pkey && *pkey && cert && !*cert) { + ERR_set_mark(); if (X509_check_private_key(x, *pkey)) { *cert = x; x = NULL; } + ERR_pop_to_mark(); } if (ca && x) {