Sanity check provider up-calls
authorMatt Caswell <matt@openssl.org>
Mon, 12 Apr 2021 14:22:56 +0000 (15:22 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 16 Apr 2021 13:27:28 +0000 (14:27 +0100)
commit7b9f02798f68d9108623f5879f3fc73c06f9a2c7
treea7325b21a9c4a94a0cec7ed6b46d4aa2fe25c0a9
parent6ce58488bdce66584a7075e19821add29445d746
Sanity check provider up-calls

When we store references to up-calls for future reference we run a sanity
check to make sure we either previously haven't set these values or they
are the same as last time. We don't support the scenario where an
application is linked against multiple versions of libcrypto but using a
shared fips.so file. This would result in different up-calls for different
calls to OSSL_provider_init(), which we currently can't handle.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14814)
providers/common/provider_seeding.c
providers/fips/fipsprov.c
providers/legacyprov.c