Lines Matching refs:md
43 const EVP_MD *md; member
100 dctx->md = sctx->md; in pkey_rsa_copy()
149 if (rctx->md) { in pkey_rsa_sign()
150 md_size = EVP_MD_get_size(rctx->md); in pkey_rsa_sign()
161 if (EVP_MD_get_type(rctx->md) == NID_mdc2) { in pkey_rsa_sign()
180 rctx->tbuf[tbslen] = RSA_X931_hash_id(EVP_MD_get_type(rctx->md)); in pkey_rsa_sign()
185 ret = RSA_sign(EVP_MD_get_type(rctx->md), in pkey_rsa_sign()
195 rctx->md, rctx->mgf1md, in pkey_rsa_sign()
225 if (rctx->md) { in pkey_rsa_verifyrecover()
234 if (rctx->tbuf[ret] != RSA_X931_hash_id(EVP_MD_get_type(rctx->md))) { in pkey_rsa_verifyrecover()
238 if (ret != EVP_MD_get_size(rctx->md)) { in pkey_rsa_verifyrecover()
246 ret = ossl_rsa_verify(EVP_MD_get_type(rctx->md), in pkey_rsa_verifyrecover()
278 if (rctx->md) { in pkey_rsa_verify()
280 return RSA_verify(EVP_MD_get_type(rctx->md), tbs, tbslen, in pkey_rsa_verify()
282 md_size = EVP_MD_get_size(rctx->md); in pkey_rsa_verify()
303 rctx->md, rctx->mgf1md, in pkey_rsa_verify()
348 rctx->md, rctx->mgf1md)) in pkey_rsa_encrypt()
384 rctx->md, rctx->mgf1md); in pkey_rsa_decrypt()
398 static int check_padding_md(const EVP_MD *md, int padding) in check_padding_md() argument
402 if (!md) in check_padding_md()
405 mdnid = EVP_MD_get_type(md); in check_padding_md()
457 if (!check_padding_md(rctx->md, p1)) in pkey_rsa_ctrl()
463 if (!rctx->md) in pkey_rsa_ctrl()
464 rctx->md = EVP_sha1(); in pkey_rsa_ctrl()
471 if (!rctx->md) in pkey_rsa_ctrl()
472 rctx->md = EVP_sha1(); in pkey_rsa_ctrl()
502 md_size = EVP_MD_get_size(rctx->md); in pkey_rsa_ctrl()
550 *(const EVP_MD **)p2 = rctx->md; in pkey_rsa_ctrl()
552 rctx->md = p2; in pkey_rsa_ctrl()
559 if (EVP_MD_get_type(rctx->md) == EVP_MD_get_type(p2)) in pkey_rsa_ctrl()
564 rctx->md = p2; in pkey_rsa_ctrl()
568 *(const EVP_MD **)p2 = rctx->md; in pkey_rsa_ctrl()
582 *(const EVP_MD **)p2 = rctx->md; in pkey_rsa_ctrl()
772 if (rctx->md == NULL && rctx->mgf1md == NULL && rctx->saltlen == -2) in rsa_set_pss_param()
774 rsa->pss = ossl_rsa_pss_params_create(rctx->md, rctx->mgf1md, in rsa_set_pss_param()
870 const EVP_MD *md; in pkey_pss_init() local
882 if (!ossl_rsa_pss_get_param(rsa->pss, &md, &mgf1md, &min_saltlen)) in pkey_pss_init()
886 md_size = EVP_MD_get_size(md); in pkey_pss_init()
906 rctx->md = md; in pkey_pss_init()