]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Ensure we initialized the locale before evp_pkey_name2type
authorDmitry Belyavskiy <beldmit@gmail.com>
Fri, 22 Apr 2022 16:16:56 +0000 (18:16 +0200)
committerDmitry Belyavskiy <beldmit@gmail.com>
Fri, 29 Apr 2022 12:13:02 +0000 (14:13 +0200)
Fixes #18158

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18199)

crypto/evp/pmeth_lib.c

index a61876621aa48986e7e8af71cf89c629c1007476..530e1b47d1b94ee0b3b7b7a49c4afcfb258353f4 100644 (file)
@@ -23,7 +23,7 @@
 #include <openssl/dh.h>
 #include <openssl/rsa.h>
 #include <openssl/kdf.h>
-#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;