Store some FIPS global variables in the FIPS_GLOBAL structure
authorMatt Caswell <matt@openssl.org>
Fri, 9 Apr 2021 16:26:34 +0000 (17:26 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 16 Apr 2021 13:27:28 +0000 (14:27 +0100)
commit6ce58488bdce66584a7075e19821add29445d746
treea5b5bde99d963808dabc07b430a48a140036d6e1
parent81cc5ce1a0f996f88051f031bda1079961ee4a5c
Store some FIPS global variables in the FIPS_GLOBAL structure

We had some FIPS global variables that were based on values from the
config file. In theory if two instances of the fips module are loaded
they could be based on different config files which would cause this to
fail. Instead we store them in the FIPS_GLOBAL structure.

Fixes #14364

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14814)
12 files changed:
providers/common/include/prov/securitycheck.h
providers/common/securitycheck.c
providers/common/securitycheck_default.c
providers/common/securitycheck_fips.c
providers/fips/fipsprov.c
providers/implementations/asymciphers/rsa_enc.c
providers/implementations/exchange/dh_exch.c
providers/implementations/exchange/ecdh_exch.c
providers/implementations/kem/rsa_kem.c
providers/implementations/signature/dsa.c
providers/implementations/signature/ecdsa.c
providers/implementations/signature/rsa.c