Lines Matching refs:mdname

128     char mdname[OSSL_MAX_NAME_SIZE]; /* Purely informational */  member
177 const char *mdname, const char *mgf1_mdname, in rsa_check_padding() argument
182 if (mdname != NULL || mdnid != NID_undef) { in rsa_check_padding()
195 if ((mdname != NULL && !EVP_MD_is_a(prsactx->md, mdname)) in rsa_check_padding()
370 static int rsa_setup_md(PROV_RSA_CTX *ctx, const char *mdname, in rsa_setup_md() argument
378 if (mdname != NULL) { in rsa_setup_md()
380 size_t mdname_len = strlen(mdname); in rsa_setup_md()
382 md = EVP_MD_fetch(ctx->libctx, mdname, mdprops); in rsa_setup_md()
386 "%s could not be fetched", mdname); in rsa_setup_md()
392 "digest=%s", mdname); in rsa_setup_md()
420 if (!rsa_check_padding(ctx, mdname, NULL, md_nid)) in rsa_setup_md()
422 if (mdname_len >= sizeof(ctx->mdname)) { in rsa_setup_md()
424 "%s exceeds name buffer length", mdname); in rsa_setup_md()
429 if (ctx->mdname[0] != '\0' && !EVP_MD_is_a(md, ctx->mdname)) { in rsa_setup_md()
431 "digest %s != %s", mdname, ctx->mdname); in rsa_setup_md()
445 OPENSSL_strlcpy(ctx->mgf1_mdname, mdname, sizeof(ctx->mgf1_mdname)); in rsa_setup_md()
454 OPENSSL_strlcpy(ctx->mdname, mdname, sizeof(ctx->mdname)); in rsa_setup_md()
463 static int rsa_setup_mgf1_md(PROV_RSA_CTX *ctx, const char *mdname, in rsa_setup_mgf1_md() argument
473 if ((md = EVP_MD_fetch(ctx->libctx, mdname, mdprops)) == NULL) { in rsa_setup_mgf1_md()
475 "%s could not be fetched", mdname); in rsa_setup_mgf1_md()
480 || !rsa_check_padding(ctx, NULL, mdname, mdnid)) { in rsa_setup_mgf1_md()
483 "digest=%s", mdname); in rsa_setup_mgf1_md()
487 len = OPENSSL_strlcpy(ctx->mgf1_mdname, mdname, sizeof(ctx->mgf1_mdname)); in rsa_setup_mgf1_md()
490 "%s exceeds name buffer length", mdname); in rsa_setup_mgf1_md()
551 const char *mdname, *mgf1mdname; in rsa_signverify_init() local
554 mdname = ossl_rsa_oaeppss_nid2name(md_nid); in rsa_signverify_init()
557 if (mdname == NULL) { in rsa_signverify_init()
568 len = OPENSSL_strlcpy(prsactx->mdname, mdname, in rsa_signverify_init()
569 sizeof(prsactx->mdname)); in rsa_signverify_init()
570 if (len >= sizeof(prsactx->mdname)) { in rsa_signverify_init()
586 || !rsa_setup_md(prsactx, mdname, prsactx->propq, desc) in rsa_signverify_init()
1187 static int rsa_digest_signverify_init(void *vprsactx, const char *mdname, in rsa_digest_signverify_init() argument
1202 if (mdname != NULL in rsa_digest_signverify_init()
1204 && (mdname[0] == '\0' || OPENSSL_strcasecmp(prsactx->mdname, mdname) != 0) in rsa_digest_signverify_init()
1205 && !rsa_setup_md(prsactx, mdname, prsactx->propq, desc)) in rsa_digest_signverify_init()
1227 static int rsa_digest_sign_init(void *vprsactx, const char *mdname, in rsa_digest_sign_init() argument
1232 return rsa_digest_signverify_init(vprsactx, mdname, vrsa, in rsa_digest_sign_init()
1271 static int rsa_digest_verify_init(void *vprsactx, const char *mdname, in rsa_digest_verify_init() argument
1276 return rsa_digest_signverify_init(vprsactx, mdname, vrsa, in rsa_digest_verify_init()
1438 if (p != NULL && !OSSL_PARAM_set_utf8_string(p, prsactx->mdname)) in rsa_get_ctx_params()
1538 char mdname[OSSL_MAX_NAME_SIZE] = "", *pmdname = NULL; in rsa_set_ctx_params() local
1573 pmdname = mdname; in rsa_set_ctx_params()
1574 if (!OSSL_PARAM_get_utf8_string(p, &pmdname, sizeof(mdname))) in rsa_set_ctx_params()
1921 const char *mdname, in rsa_sigalg_signverify_init() argument
1940 if (!rsa_setup_md(prsactx, mdname, NULL, desc)) in rsa_sigalg_signverify_init()