Browse Source

Don't output bogus errors in PKCS12_parse

PR#3923

Reviewed-by: Tim Hudson <tjh@openssl.org>
master
Dr. Stephen Henson 7 years ago
parent
commit
ffbf304d48
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      crypto/pkcs12/p12_kiss.c

+ 2
- 0
crypto/pkcs12/p12_kiss.c View File

@ -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) {


Loading…
Cancel
Save