diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-05-05 08:11:24 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-05-09 08:44:11 +0200 |
commit | edceec7fe0c9a5534ae155c8398c63dd7dd95483 (patch) | |
tree | d46f1437e39999983b9bebf3696bd08aaf6a99a0 /crypto | |
parent | f1eb40a1d5b387d7908faef31f4dbc6e4f4c23e5 (diff) |
EVP_PKEY_Q_keygen: Call OPENSSL_init_crypto to init strcasecmp
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18247)
(cherry picked from commit b807c2fbab2128cf3746bb2ebd51cbe3bb6914a9)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/evp_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index 3fe4743761..d9b8c0af41 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -24,6 +24,7 @@ #include <openssl/dh.h> #include <openssl/ec.h> #include "crypto/evp.h" +#include "crypto/cryptlib.h" #include "internal/provider.h" #include "evp_local.h" @@ -1094,6 +1095,8 @@ int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags) return (ctx->flags & flags); } +#if !defined(FIPS_MODULE) + int EVP_PKEY_CTX_set_group_name(EVP_PKEY_CTX *ctx, const char *name) { OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END }; @@ -1169,6 +1172,8 @@ EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq, va_start(args, type); + OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL); + if (OPENSSL_strcasecmp(type, "RSA") == 0) { bits = va_arg(args, size_t); params[0] = OSSL_PARAM_construct_size_t(OSSL_PKEY_PARAM_RSA_BITS, &bits); @@ -1189,3 +1194,5 @@ EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq, va_end(args); return ret; } + +#endif /* !defined(FIPS_MODULE) */ |