aboutsummaryrefslogtreecommitdiff
path: root/crypto/pkcs12/p12_kiss.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pkcs12/p12_kiss.c')
-rw-r--r--crypto/pkcs12/p12_kiss.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c
index ee476c38f4a7..9aa3c90c4e57 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) {