From ac844f7ca8a15ac6727f113335f5a54b8c0ef7cf Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Fri, 22 Apr 2022 18:16:56 +0200 Subject: Ensure we initialized the locale before evp_pkey_name2type Fixes #18158 Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/18175) --- crypto/evp/pmeth_lib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crypto/evp') diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index 2b9c6c2351..92d25de445 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -27,6 +27,7 @@ #ifndef FIPS_MODULE # include "crypto/asn1.h" #endif +#include "crypto/ctype.h" #include "crypto/evp.h" #include "crypto/dh.h" #include "crypto/ec.h" @@ -199,6 +200,7 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx, } #ifndef FIPS_MODULE if (keytype != NULL) { + ossl_init_casecmp(); id = evp_pkey_name2type(keytype); if (id == NID_undef) id = -1; -- cgit v1.2.3