Lines Matching refs:ri
146 static int pkcs7_encode_rinfo(PKCS7_RECIP_INFO *ri, in pkcs7_encode_rinfo() argument
154 const PKCS7_CTX *ctx = ri->ctx; in pkcs7_encode_rinfo()
156 pkey = X509_get0_pubkey(ri->cert); in pkcs7_encode_rinfo()
178 ASN1_STRING_set0(ri->enc_key, ek, eklen); in pkcs7_encode_rinfo()
191 PKCS7_RECIP_INFO *ri, EVP_PKEY *pkey, in pkcs7_decrypt_rinfo() argument
198 const PKCS7_CTX *ctx = ri->ctx; in pkcs7_decrypt_rinfo()
216 ri->enc_key->data, ri->enc_key->length); in pkcs7_decrypt_rinfo()
245 PKCS7_RECIP_INFO *ri = NULL; in PKCS7_dataInit() local
370 ri = sk_PKCS7_RECIP_INFO_value(rsk, i); in PKCS7_dataInit()
371 if (pkcs7_encode_rinfo(ri, key, keylen) <= 0) in PKCS7_dataInit()
424 static int pkcs7_cmp_ri(PKCS7_RECIP_INFO *ri, X509 *pcert) in pkcs7_cmp_ri() argument
427 ret = X509_NAME_cmp(ri->issuer_and_serial->issuer, in pkcs7_cmp_ri()
432 ri->issuer_and_serial->serial); in pkcs7_cmp_ri()
450 PKCS7_RECIP_INFO *ri = NULL; in PKCS7_dataDecode() local
602 ri = sk_PKCS7_RECIP_INFO_value(rsk, i); in PKCS7_dataDecode()
603 if (!pkcs7_cmp_ri(ri, pcert)) in PKCS7_dataDecode()
605 ri = NULL; in PKCS7_dataDecode()
607 if (ri == NULL) { in PKCS7_dataDecode()
621 ri = sk_PKCS7_RECIP_INFO_value(rsk, i); in PKCS7_dataDecode()
622 ri->ctx = p7_ctx; in PKCS7_dataDecode()
623 if (pkcs7_decrypt_rinfo(&ek, &eklen, ri, pkey, in PKCS7_dataDecode()
629 ri->ctx = p7_ctx; in PKCS7_dataDecode()
631 if (pkcs7_decrypt_rinfo(&ek, &eklen, ri, pkey, 0) < 0) in PKCS7_dataDecode()
1190 PKCS7_RECIP_INFO *ri; in PKCS7_get_issuer_and_serial() local
1203 ri = sk_PKCS7_RECIP_INFO_value(rsk, idx); in PKCS7_get_issuer_and_serial()
1204 return ri->issuer_and_serial; in PKCS7_get_issuer_and_serial()