From: Dmitry Belyavskiy Date: Fri, 22 Apr 2022 16:16:56 +0000 (+0200) Subject: Ensure we initialized the locale before evp_pkey_name2type X-Git-Tag: openssl-3.2.0-alpha1~2729 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e560655f72dc27bcea973c6abfe99af75d313ad7;p=thirdparty%2Fopenssl.git Ensure we initialized the locale before evp_pkey_name2type Fixes #18158 Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/18199) --- diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index a61876621aa..530e1b47d1b 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -23,7 +23,7 @@ #include #include #include -#include "internal/cryptlib.h" +#include "crypto/cryptlib.h" #ifndef FIPS_MODULE # include "crypto/asn1.h" #endif @@ -199,6 +199,7 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx, } #ifndef FIPS_MODULE if (keytype != NULL) { + OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL); id = evp_pkey_name2type(keytype); if (id == NID_undef) id = -1;