summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-08-23 14:03:28 +0200
committerRichard Levitte <levitte@openssl.org>2019-09-03 10:36:49 +0200
commit3ca9d210c94b9b88b89b224797aa403dfe97ccce (patch)
tree6e365bd489d75e5d4a8ae814103edbfecc715715 /doc
parent7964e3709af59675795ab1f4f69a935980379a66 (diff)
Refactor how KEYMGMT methods get associated with other methods
KEYMGMT methods were attached to other methods after those were fully created and registered, thereby creating a potential data race, if two threads tried to create the exact same method at the same time. Instead of this, we change the method creating function to take an extra data parameter, passed all the way from the public fetching function. In the case of EVP_KEYEXCH, we pass all the necessary data that evp_keyexch_from_dispatch() needs to be able to fetch the appropriate KEYMGMT method on the fly. Fixes #9592 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9678)
Diffstat (limited to 'doc')
-rw-r--r--doc/internal/man3/evp_generic_fetch.pod9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/internal/man3/evp_generic_fetch.pod b/doc/internal/man3/evp_generic_fetch.pod
index 0688ac0170..b77391e386 100644
--- a/doc/internal/man3/evp_generic_fetch.pod
+++ b/doc/internal/man3/evp_generic_fetch.pod
@@ -11,8 +11,11 @@ evp_generic_fetch - generic algorithm fetcher and method creator for EVP
void *evp_generic_fetch(OPENSSL_CTX *libctx, int operation_id,
const char *name, const char *properties,
- void *(*new_method)(const OSSL_DISPATCH *fns,
- OSSL_PROVIDER *prov),
+ void *(*new_method)(const char *name,
+ const OSSL_DISPATCH *fns,
+ OSSL_PROVIDER *prov,
+ void *method_data),
+ void *method_data,
int (*up_ref_method)(void *),
void (*free_method)(void *));
@@ -31,6 +34,8 @@ The three functions are supposed to:
creates an internal method from function pointers found in the
dispatch table C<fns>.
+The algorithm I<name>, provider I<prov>, and I<method_data> are
+also passed to be used as new_method() sees fit.
=item up_ref_method()