Lines Matching refs:pss

273 	RSA_PSS_PARAMS *pss;
281 pss = d2i_RSA_PSS_PARAMS(NULL, &p, plen);
283 if (!pss)
286 if (pss->maskGenAlgorithm)
288 ASN1_TYPE *param = pss->maskGenAlgorithm->parameter;
289 if (OBJ_obj2nid(pss->maskGenAlgorithm->algorithm) == NID_mgf1
298 return pss;
301 static int rsa_pss_param_print(BIO *bp, RSA_PSS_PARAMS *pss,
305 if (!pss)
318 if (pss->hashAlgorithm)
320 if (i2a_ASN1_OBJECT(bp, pss->hashAlgorithm->algorithm) <= 0)
334 if (pss->maskGenAlgorithm)
336 if (i2a_ASN1_OBJECT(bp, pss->maskGenAlgorithm->algorithm) <= 0)
356 if (pss->saltLength)
358 if (i2a_ASN1_INTEGER(bp, pss->saltLength) <= 0)
369 if (pss->trailerField)
371 if (i2a_ASN1_INTEGER(bp, pss->trailerField) <= 0)
392 RSA_PSS_PARAMS *pss;
394 pss = rsa_pss_decode(sigalg, &maskHash);
395 rv = rsa_pss_param_print(bp, pss, maskHash, indent);
396 if (pss)
397 RSA_PSS_PARAMS_free(pss);
467 RSA_PSS_PARAMS *pss;
477 pss = rsa_pss_decode(sigalg, &maskHash);
479 if (pss == NULL)
485 if (pss->maskGenAlgorithm)
487 if (OBJ_obj2nid(pss->maskGenAlgorithm->algorithm) != NID_mgf1)
507 if (pss->hashAlgorithm)
509 md = EVP_get_digestbyobj(pss->hashAlgorithm->algorithm);
519 if (pss->saltLength)
521 saltlen = ASN1_INTEGER_get(pss->saltLength);
538 if (pss->trailerField && ASN1_INTEGER_get(pss->trailerField) != 1)
561 RSA_PSS_PARAMS_free(pss);
580 RSA_PSS_PARAMS *pss = NULL;
598 pss = RSA_PSS_PARAMS_new();
599 if (!pss)
603 pss->saltLength = ASN1_INTEGER_new();
604 if (!pss->saltLength)
606 if (!ASN1_INTEGER_set(pss->saltLength, saltlen))
611 pss->hashAlgorithm = X509_ALGOR_new();
612 if (!pss->hashAlgorithm)
614 X509_ALGOR_set_md(pss->hashAlgorithm, sigmd);
625 pss->maskGenAlgorithm = X509_ALGOR_new();
626 if (!pss->maskGenAlgorithm)
628 X509_ALGOR_set0(pss->maskGenAlgorithm,
632 /* Finally create string with pss parameter encoding. */
633 if (!ASN1_item_pack(pss, ASN1_ITEM_rptr(RSA_PSS_PARAMS), &os1))
650 if (pss)
651 RSA_PSS_PARAMS_free(pss);