Modify ossl_method_store_add() to accept an OSSL_PROVIDER and check for it
authorRichard Levitte <levitte@openssl.org>
Wed, 21 Aug 2019 08:08:44 +0000 (10:08 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 21 Aug 2019 23:50:30 +0000 (01:50 +0200)
commitc1d56231ef6385b557ec72eec508e55ea26ca8b0
treec813f45c7adc28816afbd199b5df4d972fc54019
parentb1d40ddfe23fd9551b89cdcfa52d1c23fc667f8a
Modify ossl_method_store_add() to accept an OSSL_PROVIDER and check for it

If ossl_method_store_add() gets called with a method that already exists
(i.e. the store has one with matching provider, nid and properties), that
method should not be stored.  We do this check inside ossl_method_store_add()
because it has all the locking required to do so safely.

Fixes #9561

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9650)
crypto/core_fetch.c
crypto/evp/evp_fetch.c
crypto/property/property.c
doc/internal/man3/OSSL_METHOD_STORE.pod
include/internal/core.h
include/internal/property.h
test/property_test.c