diff options
author | Matt Caswell <matt@openssl.org> | 2021-04-29 16:37:42 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-05-11 14:59:43 +0100 |
commit | 8c627075656cf2709680eeb5aa1826f00db2e483 (patch) | |
tree | e9c1e8ac25bf22bfefa28d3a5871b1a67ac16eda /crypto/provider_conf.c | |
parent | 3b85bcfa14988cb383d94e5dee16645ce1ad39ed (diff) | |
download | openssl-new-8c627075656cf2709680eeb5aa1826f00db2e483.tar.gz |
Add support for child provider to up_ref/free their parent
If the ref counts on a child provider change, then this needs to be
reflected in the parent so we add callbacks to do this.
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14991)
Diffstat (limited to 'crypto/provider_conf.c')
-rw-r--r-- | crypto/provider_conf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/provider_conf.c b/crypto/provider_conf.c index 6223d27cbb..5725ef3c63 100644 --- a/crypto/provider_conf.c +++ b/crypto/provider_conf.c @@ -46,7 +46,7 @@ static void prov_conf_ossl_ctx_free(void *vpcgbl) static const OSSL_LIB_CTX_METHOD provider_conf_ossl_ctx_method = { /* Must be freed before the provider store is freed */ - OSSL_LIB_CTX_METHOD_HIGH_PRIORITY, + OSSL_LIB_CTX_METHOD_PRIORITY_2, prov_conf_ossl_ctx_new, prov_conf_ossl_ctx_free, }; @@ -164,7 +164,7 @@ static int provider_conf_load(OSSL_LIB_CTX *libctx, const char *name, ok = provider_conf_params(prov, NULL, value, cnf); if (ok && activate) { - if (!ossl_provider_activate(prov, 0)) { + if (!ossl_provider_activate(prov, 0, 1)) { ok = 0; } else { if (pcgbl->activated_providers == NULL) |