Don't attempt to deactive child providers if we don't need to
authorMatt Caswell <matt@openssl.org>
Fri, 5 Nov 2021 13:42:40 +0000 (13:42 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 15 Nov 2021 14:22:41 +0000 (14:22 +0000)
commitd740c9d59bcff6879bc7d6ecf8b82c9300991b50
tree3f46ee60c16545ed9d13b09d49afe92b08fe69e2
parent4f224595162b7996bfb673457ea9d37f11478793
Don't attempt to deactive child providers if we don't need to

If a provider doesn't have any child providers then there is no need
to attempt to remove them - so we should not do so. This removes some
potentialy thread races.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17018)
crypto/provider.c
crypto/provider_child.c
crypto/provider_conf.c
crypto/provider_core.c
doc/internal/man3/ossl_provider_new.pod
include/internal/provider.h
test/provider_internal_test.c