Fix a crash with multi-threaded applications using the FIPS module
authorMatt Caswell <matt@openssl.org>
Thu, 10 Dec 2020 14:44:25 +0000 (14:44 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 14 Jan 2021 17:30:46 +0000 (17:30 +0000)
commitf6b72c7d75658e843ea0864e2f202cdc091020f9
treeb60d77a52f125069bb8706771d2aa14067bc4bbc
parentc476c06f507a2c64a59c8cc86f2109aa00cf5133
Fix a crash with multi-threaded applications using the FIPS module

The FIPS implementation of the ossl_ctx_thread_stop function needs to
use an OSSL_LIB_CTX - but gets passed a provctx as an argument. It was
assuming that these are the same thing (which was true at one point
during development) - but that is no longer the case. The fix is to
get the OSSL_LIB_CTX out of the provctx.

Fixes #13469

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13660)
crypto/initthread.c