summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-08-21 09:58:10 +0200
committerRichard Levitte <levitte@openssl.org>2019-08-22 01:50:30 +0200
commitb1d40ddfe23fd9551b89cdcfa52d1c23fc667f8a (patch)
tree1eb6cc4b725753f4f20a5e2ded72fcd1a919a114 /doc
parentd32d304836caaca475c21a82b94e494898cb60c5 (diff)
Modify ossl_method_store_add() to handle reference counting
Because this function affects the reference count on failure (the call to impl_free() does this), it may as well handle incrementing it as well to indicate the extra reference in the method store. 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.pod12
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/internal/man3/OSSL_METHOD_STORE.pod b/doc/internal/man3/OSSL_METHOD_STORE.pod
index abe7ebe317..be439f15b5 100644
--- a/doc/internal/man3/OSSL_METHOD_STORE.pod
+++ b/doc/internal/man3/OSSL_METHOD_STORE.pod
@@ -20,8 +20,9 @@ ossl_method_store_cache_get, ossl_method_store_cache_set
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 nid, const char *properties,
- void *method, void (*method_destruct)(void *));
+ int nid, const char *properties, void *method,
+ int (*method_up_ref)(void *),
+ void (*method_destruct)(void *));
int ossl_method_store_remove(OSSL_METHOD_STORE *store,
int nid, const void *method);
int ossl_method_store_fetch(OSSL_METHOD_STORE *store,
@@ -64,8 +65,11 @@ 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>.
-The optional B<method_destruct> function is called when B<method> is being
-released from B<store>.
+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
+fails to add the method to the store, or later on when it is being released from
+the B<store>.
ossl_method_store_remove() removes the B<method> identified by B<nid> from the
B<store>.