Use a write lock during ossl_provider_find()
authorMatt Caswell <matt@openssl.org>
Tue, 9 Nov 2021 14:32:14 +0000 (14:32 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 12 Nov 2021 17:16:14 +0000 (17:16 +0000)
commit4aced11785f2e54875ad56f30c05bdee02b6e4e2
treebc6dc99406a71e8c5233d8950e6fc58d5e4df4f2
parent1e8ed3e596162d7490b26fb12e58af5208f52402
Use a write lock during ossl_provider_find()

A "find" operation on a stack can end up sorting the underlying stack. In
this case it is necessary to use a "write" lock to synchronise access to
the stack across multiple threads.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16980)
crypto/provider_core.c
doc/man3/DEFINE_STACK_OF.pod