summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-08-21 10:08:44 +0200
committerRichard Levitte <levitte@openssl.org>2019-08-22 01:50:30 +0200
commitc1d56231ef6385b557ec72eec508e55ea26ca8b0 (patch)
treec813f45c7adc28816afbd199b5df4d972fc54019 /doc
parentb1d40ddfe23fd9551b89cdcfa52d1c23fc667f8a (diff)
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)
Diffstat (limited to 'doc')
-rw-r--r--doc/internal/man3/OSSL_METHOD_STORE.pod8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/internal/man3/OSSL_METHOD_STORE.pod b/doc/internal/man3/OSSL_METHOD_STORE.pod
index be439f15b5..afd1dd5982 100644
--- a/doc/internal/man3/OSSL_METHOD_STORE.pod
+++ b/doc/internal/man3/OSSL_METHOD_STORE.pod
@@ -19,7 +19,7 @@ ossl_method_store_cache_get, ossl_method_store_cache_set
void ossl_method_store_free(OSSL_METHOD_STORE *store);
int ossl_method_store_init(OPENSSL_CTX *ctx);
void ossl_method_store_cleanup(OPENSSL_CTX *ctx);
- int ossl_method_store_add(OSSL_METHOD_STORE *store,
+ int ossl_method_store_add(OSSL_METHOD_STORE *store, const OSSL_PROVIDER *prov,
int nid, const char *properties, void *method,
int (*method_up_ref)(void *),
void (*method_destruct)(void *));
@@ -63,8 +63,10 @@ B<ctx> to allow access to the required underlying property data.
ossl_method_store_free() frees resources allocated to B<store>.
-ossl_method_store_add() adds the B<method> to the B<store> as an instance of an
-algorithm indicated by B<nid> and the property definition B<properties>.
+ossl_method_store_add() adds the B<method> constructed from an implementation in
+the provider B<prov> to the B<store> as an instance of an algorithm indicated by
+B<nid> and the property definition B<properties>, unless the B<store> already
+has a method from the same provider with the same B<nid> and B<properties>.
If the B<method_up_ref> function is given, it's called to increment the
reference count of the method.
If the B<method_destruct> function is given, it's called when this function