Lines Matching refs:saltlen

137     int saltlen;  member
250 prsactx->saltlen = RSA_PSS_SALTLEN_AUTO_DIGEST_MAX; in rsa_newctx()
257 int saltlen = ctx->saltlen; in rsa_pss_compute_saltlen() local
267 if (saltlen == RSA_PSS_SALTLEN_DIGEST) { in rsa_pss_compute_saltlen()
268 if ((saltlen = EVP_MD_get_size(ctx->md)) <= 0) { in rsa_pss_compute_saltlen()
272 } else if (saltlen == RSA_PSS_SALTLEN_AUTO_DIGEST_MAX) { in rsa_pss_compute_saltlen()
273 saltlen = RSA_PSS_SALTLEN_MAX; in rsa_pss_compute_saltlen()
279 if (saltlen == RSA_PSS_SALTLEN_MAX || saltlen == RSA_PSS_SALTLEN_AUTO) { in rsa_pss_compute_saltlen()
290 saltlen = rsasize - mdsize - 2; in rsa_pss_compute_saltlen()
292 saltlen--; in rsa_pss_compute_saltlen()
293 if (saltlenMax >= 0 && saltlen > saltlenMax) in rsa_pss_compute_saltlen()
294 saltlen = saltlenMax; in rsa_pss_compute_saltlen()
296 if (saltlen < 0) { in rsa_pss_compute_saltlen()
299 } else if (saltlen < ctx->min_saltlen) { in rsa_pss_compute_saltlen()
302 ctx->min_saltlen, saltlen); in rsa_pss_compute_saltlen()
305 return saltlen; in rsa_pss_compute_saltlen()
315 int saltlen; in rsa_generate_signature_aid() local
340 saltlen = rsa_pss_compute_saltlen(ctx); in rsa_generate_signature_aid()
341 if (saltlen < 0) in rsa_generate_signature_aid()
347 || !ossl_rsa_pss_params_30_set_saltlen(&pss_params, saltlen) in rsa_generate_signature_aid()
533 prsactx->saltlen = RSA_PSS_SALTLEN_AUTO_DIGEST_MAX; in rsa_signverify_init()
582 prsactx->saltlen = min_saltlen; in rsa_signverify_init()
633 static int rsa_pss_saltlen_check_passed(PROV_RSA_CTX *ctx, const char *algoname, int saltlen) in rsa_pss_saltlen_check_passed() argument
642 int approved = (saltlen >= 0 && saltlen <= mdsize); in rsa_pss_saltlen_check_passed()
758 int saltlen; in rsa_sign_directly() local
762 switch (prsactx->saltlen) { in rsa_sign_directly()
775 if (prsactx->saltlen >= 0 in rsa_sign_directly()
776 && prsactx->saltlen < prsactx->min_saltlen) { in rsa_sign_directly()
782 prsactx->saltlen); in rsa_sign_directly()
790 saltlen = prsactx->saltlen; in rsa_sign_directly()
794 &saltlen)) { in rsa_sign_directly()
799 if (!rsa_pss_saltlen_check_passed(prsactx, "RSA Sign", saltlen)) in rsa_sign_directly()
1055 int saltlen; in rsa_verify_directly() local
1078 saltlen = prsactx->saltlen; in rsa_verify_directly()
1082 &saltlen); in rsa_verify_directly()
1088 if (!rsa_pss_saltlen_check_passed(prsactx, "RSA Verify", saltlen)) in rsa_verify_directly()
1448 if (!OSSL_PARAM_set_int(p, prsactx->saltlen)) in rsa_get_ctx_params()
1453 switch (prsactx->saltlen) { in rsa_get_ctx_params()
1469 prsactx->saltlen); in rsa_get_ctx_params()
1537 int saltlen; in rsa_set_ctx_params() local
1565 saltlen = prsactx->saltlen; in rsa_set_ctx_params()
1677 if (!OSSL_PARAM_get_int(p, &saltlen)) in rsa_set_ctx_params()
1682 saltlen = RSA_PSS_SALTLEN_DIGEST; in rsa_set_ctx_params()
1684 saltlen = RSA_PSS_SALTLEN_MAX; in rsa_set_ctx_params()
1686 saltlen = RSA_PSS_SALTLEN_AUTO; in rsa_set_ctx_params()
1688 saltlen = RSA_PSS_SALTLEN_AUTO_DIGEST_MAX; in rsa_set_ctx_params()
1690 saltlen = atoi(p->data); in rsa_set_ctx_params()
1701 if (saltlen < RSA_PSS_SALTLEN_AUTO_DIGEST_MAX) { in rsa_set_ctx_params()
1707 switch (saltlen) { in rsa_set_ctx_params()
1729 if (saltlen >= 0 && saltlen < prsactx->min_saltlen) { in rsa_set_ctx_params()
1734 prsactx->min_saltlen, saltlen); in rsa_set_ctx_params()
1764 prsactx->saltlen = saltlen; in rsa_set_ctx_params()