Skip to content

Commit

Permalink
Ensure we initialized the locale before evp_pkey_name2type
Browse files Browse the repository at this point in the history
Fixes openssl#18158

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#18199)
  • Loading branch information
beldmit committed Apr 29, 2022
1 parent 49d874e commit e560655
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/evp/pmeth_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e560655

Please sign in to comment.