Lines Matching refs:ri
28 int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri, in CMS_RecipientInfo_kari_get0_alg() argument
32 if (ri->type != CMS_RECIPINFO_AGREE) { in CMS_RecipientInfo_kari_get0_alg()
37 *palg = ri->d.kari->keyEncryptionAlgorithm; in CMS_RecipientInfo_kari_get0_alg()
39 *pukm = ri->d.kari->ukm; in CMS_RecipientInfo_kari_get0_alg()
46 *CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri) in STACK_OF()
48 if (ri->type != CMS_RECIPINFO_AGREE) { in STACK_OF()
52 return ri->d.kari->recipientEncryptedKeys; in STACK_OF()
55 int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri, in CMS_RecipientInfo_kari_get0_orig_id() argument
64 if (ri->type != CMS_RECIPINFO_AGREE) { in CMS_RecipientInfo_kari_get0_orig_id()
68 oik = ri->d.kari->originator; in CMS_RecipientInfo_kari_get0_orig_id()
97 int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert) in CMS_RecipientInfo_kari_orig_id_cmp() argument
101 if (ri->type != CMS_RECIPINFO_AGREE) { in CMS_RecipientInfo_kari_orig_id_cmp()
105 oik = ri->d.kari->originator; in CMS_RecipientInfo_kari_orig_id_cmp()
162 int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, in CMS_RecipientInfo_kari_set0_pkey_and_peer() argument
166 CMS_KeyAgreeRecipientInfo *kari = ri->d.kari; in CMS_RecipientInfo_kari_set0_pkey_and_peer()
193 int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk) in CMS_RecipientInfo_kari_set0_pkey() argument
195 return CMS_RecipientInfo_kari_set0_pkey_and_peer(ri, pk, NULL); in CMS_RecipientInfo_kari_set0_pkey()
198 EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri) in CMS_RecipientInfo_kari_get0_ctx() argument
200 if (ri->type == CMS_RECIPINFO_AGREE) in CMS_RecipientInfo_kari_get0_ctx()
201 return ri->d.kari->ctx; in CMS_RecipientInfo_kari_get0_ctx()
254 CMS_RecipientInfo *ri, in CMS_RecipientInfo_kari_decrypt() argument
266 if (!ossl_cms_env_asn1_ctrl(ri, 1)) in CMS_RecipientInfo_kari_decrypt()
269 if (!cms_kek_cipher(&cek, &ceklen, enckey, enckeylen, ri->d.kari, 0)) in CMS_RecipientInfo_kari_decrypt()
341 int ossl_cms_RecipientInfo_kari_init(CMS_RecipientInfo *ri, X509 *recip, in ossl_cms_RecipientInfo_kari_init() argument
349 ri->d.kari = M_ASN1_new_of(CMS_KeyAgreeRecipientInfo); in ossl_cms_RecipientInfo_kari_init()
350 if (ri->d.kari == NULL) in ossl_cms_RecipientInfo_kari_init()
352 ri->type = CMS_RECIPINFO_AGREE; in ossl_cms_RecipientInfo_kari_init()
354 kari = ri->d.kari; in ossl_cms_RecipientInfo_kari_init()
386 CMS_OriginatorIdentifierOrKey *oik = ri->d.kari->originator; in ossl_cms_RecipientInfo_kari_init()
477 CMS_RecipientInfo *ri) in ossl_cms_RecipientInfo_kari_encrypt() argument
485 if (ri->type != CMS_RECIPINFO_AGREE) { in ossl_cms_RecipientInfo_kari_encrypt()
489 kari = ri->d.kari; in ossl_cms_RecipientInfo_kari_encrypt()
507 if (!ossl_cms_env_asn1_ctrl(ri, 0)) in ossl_cms_RecipientInfo_kari_encrypt()