summaryrefslogtreecommitdiffstats
path: root/providers/implementations/keymgmt
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-01-17 15:47:18 +0100
committerMatt Caswell <matt@openssl.org>2020-02-13 15:14:30 +0100
commitafb638f137958205b6b089da8967f4775b4c9bb6 (patch)
treeb11c87c306131476dfad7eb0444d291e42713893 /providers/implementations/keymgmt
parentAdd assembly config targets for UEFI build (diff)
downloadopenssl-afb638f137958205b6b089da8967f4775b4c9bb6.tar.xz
openssl-afb638f137958205b6b089da8967f4775b4c9bb6.zip
Make the RSA ASYM_CIPHER implementation available inside the FIPS module
RSA ASYM_CIPHER was already available within the default provider. We now make it also available from inside the FIPS module. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10881)
Diffstat (limited to '')
-rw-r--r--providers/implementations/keymgmt/rsa_kmgmt.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/providers/implementations/keymgmt/rsa_kmgmt.c b/providers/implementations/keymgmt/rsa_kmgmt.c
index 6ab695ea7b..f43520f857 100644
--- a/providers/implementations/keymgmt/rsa_kmgmt.c
+++ b/providers/implementations/keymgmt/rsa_kmgmt.c
@@ -18,6 +18,7 @@
#include "internal/param_build.h"
#include "prov/implementations.h"
#include "prov/providercommon.h"
+#include "prov/provider_ctx.h"
#include "crypto/rsa.h"
static OSSL_OP_keymgmt_new_fn rsa_newdata;
@@ -170,7 +171,9 @@ static int key_to_params(RSA *rsa, OSSL_PARAM_BLD *tmpl)
static void *rsa_newdata(void *provctx)
{
- return RSA_new();
+ OPENSSL_CTX *libctx = PROV_LIBRARY_CONTEXT_OF(provctx);
+
+ return rsa_new_with_ctx(libctx);
}
static void rsa_freedata(void *keydata)
@@ -321,7 +324,7 @@ static int rsa_get_params(void *key, OSSL_PARAM params[])
&& !OSSL_PARAM_set_int(p, RSA_size(rsa)))
return 0;
-# if 0 /* PSS support pending */
+# if 0 /* TODO(3.0): PSS support pending */
if ((p = OSSL_PARAM_locate(params,
OSSL_PKEY_PARAM_MANDATORY_DIGEST)) != NULL
&& RSA_get0_pss_params(rsa) != NULL) {
@@ -338,9 +341,14 @@ static int rsa_get_params(void *key, OSSL_PARAM params[])
}
#endif
if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
- && RSA_get0_pss_params(rsa) == NULL)
+/* TODO(3.0): PSS support pending */
+#if 0
+ && RSA_get0_pss_params(rsa) == NULL
+#endif
+ ) {
if (!OSSL_PARAM_set_utf8_string(p, RSA_DEFAULT_MD))
return 0;
+ }
return 1;
}