diff options
author | Richard Levitte <levitte@openssl.org> | 2019-08-23 14:03:28 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-09-03 10:36:49 +0200 |
commit | 3ca9d210c94b9b88b89b224797aa403dfe97ccce (patch) | |
tree | 6e365bd489d75e5d4a8ae814103edbfecc715715 /crypto/evp/evp_err.c | |
parent | 7964e3709af59675795ab1f4f69a935980379a66 (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 'crypto/evp/evp_err.c')
-rw-r--r-- | crypto/evp/evp_err.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c index 749f189be3..63174f98f6 100644 --- a/crypto/evp/evp_err.c +++ b/crypto/evp/evp_err.c @@ -99,6 +99,8 @@ static const ERR_STRING_DATA EVP_str_reasons[] = { {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_NO_CIPHER_SET), "no cipher set"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_NO_DEFAULT_DIGEST), "no default digest"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_NO_DIGEST_SET), "no digest set"}, + {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_NO_KEYMGMT_AVAILABLE), + "no keymgmt available"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_NO_KEYMGMT_PRESENT), "no keymgmt present"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_NO_KEY_SET), "no key set"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_NO_OPERATION_SET), "no operation set"}, |