diff options
author | Richard Levitte <levitte@openssl.org> | 2022-04-29 08:08:06 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2022-05-05 15:06:11 +0200 |
commit | 4da7663b02bf05542830e85db6f74cf90daf1f49 (patch) | |
tree | 4f9cff33c44c8e57caefbd23c66a78649a001788 /crypto/store | |
parent | Complete the cleanup of an algorithm in OSSL_METHOD_STORE (diff) | |
download | openssl-4da7663b02bf05542830e85db6f74cf90daf1f49.tar.xz openssl-4da7663b02bf05542830e85db6f74cf90daf1f49.zip |
For child libctx / provider, don't count self-references in parent
In child library contexts, which contain child "clones" of the
providers the application has in store, one of these children will
always be the provider that creates the child library context; let's
call them self-refering child providers.
For these self-refering child providers, we don't increment the parent
provider reference count, nor do we free the parent provider, as those
become self defeating and hinder the teardown and unloading process
when the application cleans up.
For non self-refering child providers, we must retain this propagation
of reference count to the parent, so that aren't torn down too early,
i.e. when there's still a "foreign" reference (fetched algorithm).
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18151)
Diffstat (limited to 'crypto/store')
0 files changed, 0 insertions, 0 deletions