]> granicus.if.org Git - openssl/commit
Refactor how KEYMGMT methods get associated with other methods
authorRichard Levitte <levitte@openssl.org>
Fri, 23 Aug 2019 12:03:28 +0000 (14:03 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 3 Sep 2019 08:36:49 +0000 (10:36 +0200)
commit3ca9d210c94b9b88b89b224797aa403dfe97ccce
tree6e365bd489d75e5d4a8ae814103edbfecc715715
parent7964e3709af59675795ab1f4f69a935980379a66
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)
crypto/err/openssl.txt
crypto/evp/digest.c
crypto/evp/evp_enc.c
crypto/evp/evp_err.c
crypto/evp/evp_fetch.c
crypto/evp/evp_locl.h
crypto/evp/exchange.c
crypto/evp/keymgmt_meth.c
crypto/evp/mac_meth.c
doc/internal/man3/evp_generic_fetch.pod
include/openssl/evperr.h