Lines Matching refs:pss

281   RSA_PSS_PARAMS *pss;
290 pss = d2i_RSA_PSS_PARAMS(NULL, &p, plen);
292 if (!pss) {
296 *pmaskHash = rsa_mgf1_decode(pss->maskGenAlgorithm);
298 return pss;
301 static int rsa_pss_param_print(BIO *bp, RSA_PSS_PARAMS *pss,
305 if (!pss) {
318 if (pss->hashAlgorithm) {
319 if (i2a_ASN1_OBJECT(bp, pss->hashAlgorithm->algorithm) <= 0) {
332 if (pss->maskGenAlgorithm) {
333 if (i2a_ASN1_OBJECT(bp, pss->maskGenAlgorithm->algorithm) <= 0 ||
355 if (pss->saltLength) {
356 if (i2a_ASN1_INTEGER(bp, pss->saltLength) <= 0) {
369 if (pss->trailerField) {
370 if (i2a_ASN1_INTEGER(bp, pss->trailerField) <= 0) {
388 RSA_PSS_PARAMS *pss;
391 pss = rsa_pss_decode(sigalg, &maskHash);
392 rv = rsa_pss_param_print(bp, pss, maskHash, indent);
393 if (pss) {
394 RSA_PSS_PARAMS_free(pss);
530 RSA_PSS_PARAMS *pss = NULL;
552 pss = RSA_PSS_PARAMS_new();
553 if (!pss) {
558 pss->saltLength = ASN1_INTEGER_new();
559 if (!pss->saltLength ||
560 !ASN1_INTEGER_set(pss->saltLength, saltlen)) {
565 if (!rsa_md_to_algor(&pss->hashAlgorithm, sigmd) ||
566 !rsa_md_to_mgf1(&pss->maskGenAlgorithm, mgf1md)) {
570 /* Finally create string with pss parameter encoding. */
571 if (!ASN1_item_pack(pss, ASN1_ITEM_rptr(RSA_PSS_PARAMS), &os)) {
577 if (pss)
578 RSA_PSS_PARAMS_free(pss);
594 RSA_PSS_PARAMS *pss;
603 pss = rsa_pss_decode(sigalg, &maskHash);
604 if (pss == NULL) {
609 mgf1md = rsa_mgf1_to_md(pss->maskGenAlgorithm, maskHash);
613 md = rsa_algor_to_md(pss->hashAlgorithm);
619 if (pss->saltLength) {
620 saltlen = ASN1_INTEGER_get(pss->saltLength);
632 if (pss->trailerField && ASN1_INTEGER_get(pss->trailerField) != 1) {
661 RSA_PSS_PARAMS_free(pss);