Make sure x509v3_cache_extensions() does not modify the error queue

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11808)
This commit is contained in:
Dr. David von Oheimb 2020-08-12 22:07:51 +02:00
parent be63e58732
commit de3713d492

View File

@ -396,6 +396,7 @@ int x509v3_cache_extensions(X509 *x)
CRYPTO_THREAD_unlock(x->lock);
return (x->ex_flags & EXFLAG_INVALID) == 0;
}
ERR_set_mark();
if (!X509_digest(x, EVP_sha1(), x->sha1_hash, NULL))
x->ex_flags |= EXFLAG_INVALID;
@ -572,6 +573,7 @@ int x509v3_cache_extensions(X509 *x)
* all stores are visible on all processors. Hence the release fence.
*/
#endif
ERR_pop_to_mark();
CRYPTO_THREAD_unlock(x->lock);
return (x->ex_flags & EXFLAG_INVALID) == 0;