|
|
727bdf |
From edceec7fe0c9a5534ae155c8398c63dd7dd95483 Mon Sep 17 00:00:00 2001
|
|
|
727bdf |
From: Tomas Mraz <tomas@openssl.org>
|
|
|
727bdf |
Date: Thu, 5 May 2022 08:11:24 +0200
|
|
|
727bdf |
Subject: [PATCH] EVP_PKEY_Q_keygen: Call OPENSSL_init_crypto to init
|
|
|
727bdf |
strcasecmp
|
|
|
727bdf |
|
|
|
727bdf |
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
|
|
|
727bdf |
Reviewed-by: Matt Caswell <matt@openssl.org>
|
|
|
727bdf |
(Merged from https://github.com/openssl/openssl/pull/18247)
|
|
|
727bdf |
|
|
|
727bdf |
(cherry picked from commit b807c2fbab2128cf3746bb2ebd51cbe3bb6914a9)
|
|
|
727bdf |
|
|
|
727bdf |
Upstream-Status: Backport [https://github.com/openssl/openssl/commit/edceec7fe0c9a5534ae155c8398c63dd7dd95483]
|
|
|
727bdf |
---
|
|
|
727bdf |
crypto/evp/evp_lib.c | 7 +++++++
|
|
|
727bdf |
1 file changed, 7 insertions(+)
|
|
|
727bdf |
|
|
|
727bdf |
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c
|
|
|
727bdf |
index 3fe4743761..d9b8c0af41 100644
|
|
|
727bdf |
--- a/crypto/evp/evp_lib.c
|
|
|
727bdf |
+++ b/crypto/evp/evp_lib.c
|
|
|
727bdf |
@@ -24,6 +24,7 @@
|
|
|
727bdf |
#include <openssl/dh.h>
|
|
|
727bdf |
#include <openssl/ec.h>
|
|
|
727bdf |
#include "crypto/evp.h"
|
|
|
727bdf |
+#include "crypto/cryptlib.h"
|
|
|
727bdf |
#include "internal/provider.h"
|
|
|
727bdf |
#include "evp_local.h"
|
|
|
727bdf |
|
|
|
727bdf |
@@ -1094,6 +1095,8 @@ int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags)
|
|
|
727bdf |
return (ctx->flags & flags);
|
|
|
727bdf |
}
|
|
|
727bdf |
|
|
|
727bdf |
+#if !defined(FIPS_MODULE)
|
|
|
727bdf |
+
|
|
|
727bdf |
int EVP_PKEY_CTX_set_group_name(EVP_PKEY_CTX *ctx, const char *name)
|
|
|
727bdf |
{
|
|
|
727bdf |
OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
|
|
|
727bdf |
@@ -1169,6 +1172,8 @@ EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq,
|
|
|
727bdf |
|
|
|
727bdf |
va_start(args, type);
|
|
|
727bdf |
|
|
|
727bdf |
+ OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL);
|
|
|
727bdf |
+
|
|
|
727bdf |
if (OPENSSL_strcasecmp(type, "RSA") == 0) {
|
|
|
727bdf |
bits = va_arg(args, size_t);
|
|
|
727bdf |
params[0] = OSSL_PARAM_construct_size_t(OSSL_PKEY_PARAM_RSA_BITS, &bits);
|
|
|
727bdf |
@@ -1189,3 +1194,5 @@ EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq,
|
|
|
727bdf |
va_end(args);
|
|
|
727bdf |
return ret;
|
|
|
727bdf |
}
|
|
|
727bdf |
+
|
|
|
727bdf |
+#endif /* !defined(FIPS_MODULE) */
|
|
|
727bdf |
--
|
|
|
727bdf |
2.35.3
|
|
|
727bdf |
|