Make provider provider_init thread safe, and flag checking/setting too
authorRichard Levitte <levitte@openssl.org>
Mon, 1 Mar 2021 12:27:24 +0000 (13:27 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 4 Mar 2021 15:09:02 +0000 (16:09 +0100)
commitc2ec2bb7c146d1e48568f27d11dca02c06c36338
tree22e81115abe5372b5be75a1ed9b825c821d14297
parentd60a8e0a2345205242e21aae35815645708580c4
Make provider provider_init thread safe, and flag checking/setting too

provider_init() makes changes in the provider structure, and needs a
bit of protection to ensure that doesn't happen concurrently with race
conditions.

This also demands a bit of protection of the flags, since they are
bits and presumably occupy the same byte in memory.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14354)
crypto/provider_core.c