[openssl] master update
Dr. Paul Dale
pauli at openssl.org
Sat May 29 10:46:42 UTC 2021
The branch master has been updated
via 43dbe3b72de0ba4ebd20e9e6a2c526ef747326ab (commit)
from f839361e3e45b5becce7c3267fa8e2f72654e75f (commit)
- Log -----------------------------------------------------------------
commit 43dbe3b72de0ba4ebd20e9e6a2c526ef747326ab
Author: Pauli <pauli at openssl.org>
Date: Fri May 28 10:25:55 2021 +1000
fips: set the library context and handle later
They need to be set once the provider will definitely be loading. If they
are set earlier, a double free results on a failure.
Fixes #15452
Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15492)
-----------------------------------------------------------------------
Summary of changes:
providers/fips/fipsprov.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 580eea574f..4155b64197 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -663,8 +663,6 @@ int OSSL_provider_init_int(const OSSL_CORE_HANDLE *handle,
OSSL_LIB_CTX_free(libctx);
goto err;
}
- ossl_prov_ctx_set0_libctx(*provctx, libctx);
- ossl_prov_ctx_set0_handle(*provctx, handle);
if ((fgbl = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_FIPS_PROV_INDEX,
&fips_prov_ossl_ctx_method)) == NULL)
@@ -707,6 +705,9 @@ int OSSL_provider_init_int(const OSSL_CORE_HANDLE *handle,
goto err;
}
+ ossl_prov_ctx_set0_libctx(*provctx, libctx);
+ ossl_prov_ctx_set0_handle(*provctx, handle);
+
*out = fips_dispatch_table;
return 1;
err:
More information about the openssl-commits
mailing list