Lines Matching refs:oaep
21 RSA_OAEP_PARAMS *oaep; in rsa_oaep_decode() local
23 oaep = ASN1_TYPE_unpack_sequence(ASN1_ITEM_rptr(RSA_OAEP_PARAMS), in rsa_oaep_decode()
26 if (oaep == NULL) in rsa_oaep_decode()
29 if (oaep->maskGenFunc != NULL) { in rsa_oaep_decode()
30 oaep->maskHash = ossl_x509_algor_mgf1_decode(oaep->maskGenFunc); in rsa_oaep_decode()
31 if (oaep->maskHash == NULL) { in rsa_oaep_decode()
32 RSA_OAEP_PARAMS_free(oaep); in rsa_oaep_decode()
36 return oaep; in rsa_oaep_decode()
48 RSA_OAEP_PARAMS *oaep; in rsa_cms_decrypt() local
63 oaep = rsa_oaep_decode(cmsalg); in rsa_cms_decrypt()
65 if (oaep == NULL) { in rsa_cms_decrypt()
70 mgf1md = ossl_x509_algor_get_md(oaep->maskHash); in rsa_cms_decrypt()
73 md = ossl_x509_algor_get_md(oaep->hashFunc); in rsa_cms_decrypt()
77 if (oaep->pSourceFunc != NULL) { in rsa_cms_decrypt()
78 X509_ALGOR *plab = oaep->pSourceFunc; in rsa_cms_decrypt()
110 RSA_OAEP_PARAMS_free(oaep); in rsa_cms_decrypt()
117 RSA_OAEP_PARAMS *oaep = NULL; in rsa_cms_encrypt() local
145 oaep = RSA_OAEP_PARAMS_new(); in rsa_cms_encrypt()
146 if (oaep == NULL) in rsa_cms_encrypt()
148 if (!ossl_x509_algor_new_from_md(&oaep->hashFunc, md)) in rsa_cms_encrypt()
150 if (!ossl_x509_algor_md_to_mgf1(&oaep->maskGenFunc, mgf1md)) in rsa_cms_encrypt()
160 oaep->pSourceFunc = ossl_X509_ALGOR_from_nid(NID_pSpecified, in rsa_cms_encrypt()
162 if (oaep->pSourceFunc == NULL) in rsa_cms_encrypt()
168 if (!ASN1_item_pack(oaep, ASN1_ITEM_rptr(RSA_OAEP_PARAMS), &os)) in rsa_cms_encrypt()
175 RSA_OAEP_PARAMS_free(oaep); in rsa_cms_encrypt()