summaryrefslogtreecommitdiffstats
path: root/providers/implementations/asymciphers/rsa_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'providers/implementations/asymciphers/rsa_enc.c')
-rw-r--r--providers/implementations/asymciphers/rsa_enc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/providers/implementations/asymciphers/rsa_enc.c b/providers/implementations/asymciphers/rsa_enc.c
index ce5ddff651..113c4cbfab 100644
--- a/providers/implementations/asymciphers/rsa_enc.c
+++ b/providers/implementations/asymciphers/rsa_enc.c
@@ -425,7 +425,7 @@ static int rsa_set_ctx_params(void *vprsactx, const OSSL_PARAM params[])
const OSSL_PARAM *p;
char mdname[OSSL_MAX_NAME_SIZE];
char mdprops[OSSL_MAX_PROPQUERY_SIZE] = { '\0' };
- char *str = mdname;
+ char *str = NULL;
if (prsactx == NULL)
return 0;
@@ -434,13 +434,14 @@ static int rsa_set_ctx_params(void *vprsactx, const OSSL_PARAM params[])
p = OSSL_PARAM_locate_const(params, OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST);
if (p != NULL) {
+ str = mdname;
if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(mdname)))
return 0;
- str = mdprops;
p = OSSL_PARAM_locate_const(params,
OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS);
if (p != NULL) {
+ str = mdprops;
if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(mdprops)))
return 0;
}
@@ -496,13 +497,14 @@ static int rsa_set_ctx_params(void *vprsactx, const OSSL_PARAM params[])
p = OSSL_PARAM_locate_const(params, OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST);
if (p != NULL) {
+ str = mdname;
if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(mdname)))
return 0;
- str = mdprops;
p = OSSL_PARAM_locate_const(params,
OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS);
if (p != NULL) {
+ str = mdprops;
if (!OSSL_PARAM_get_utf8_string(p, &str, sizeof(mdprops)))
return 0;
} else {