CORE: Attach the provider context to the provider late
authorRichard Levitte <levitte@openssl.org>
Mon, 11 May 2020 09:10:41 +0000 (11:10 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 12 May 2020 09:32:40 +0000 (11:32 +0200)
commit914db66d2337d560b042ac710817c69b89045d52
treecfbe5f51054b357065719d542ab9d71b467a4c71
parentfdaad3f1b31df6827554c378dd8385695a1deed4
CORE: Attach the provider context to the provider late

There are concerns that if |prov->provctx| is populated early,
sensitive information may leak from the provider.  Therefore, we use a
temporary variable, and only assign it to |prov->provctx| when the
provider init function has returned successfully.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11777)
crypto/provider_core.c