x509: fix coverity 1461225: data race condition

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14651)
This commit is contained in:
Pauli 2021-03-23 10:33:15 +10:00 committed by Pauli
parent 4f0831b837
commit 96a68f21c3

View File

@ -681,7 +681,10 @@ static int check_ca(const X509 *x)
void X509_set_proxy_flag(X509 *x) void X509_set_proxy_flag(X509 *x)
{ {
if (CRYPTO_THREAD_write_lock(x->lock)) {
x->ex_flags |= EXFLAG_PROXY; x->ex_flags |= EXFLAG_PROXY;
CRYPTO_THREAD_unlock(x->lock);
}
} }
void X509_set_proxy_pathlen(X509 *x, long l) void X509_set_proxy_pathlen(X509 *x, long l)