Lines Matching refs:ktri
115 pkey = ri->d.ktri->pkey; in ossl_cms_env_asn1_ctrl()
194 ri->d.ktri->cms_ctx = ctx; in ossl_cms_RecipientInfos_set_cmsctx()
195 ossl_x509_set0_libctx(ri->d.ktri->recip, in ossl_cms_RecipientInfos_set_cmsctx()
220 return ri->d.ktri->pctx; in CMS_RecipientInfo_get0_pkey_ctx()
333 CMS_KeyTransRecipientInfo *ktri; in cms_RecipientInfo_ktri_init() local
336 ri->d.ktri = M_ASN1_new_of(CMS_KeyTransRecipientInfo); in cms_RecipientInfo_ktri_init()
337 if (!ri->d.ktri) in cms_RecipientInfo_ktri_init()
341 ktri = ri->d.ktri; in cms_RecipientInfo_ktri_init()
342 ktri->cms_ctx = ctx; in cms_RecipientInfo_ktri_init()
345 ktri->version = 2; in cms_RecipientInfo_ktri_init()
348 ktri->version = 0; in cms_RecipientInfo_ktri_init()
357 if (!ossl_cms_set1_SignerIdentifier(ktri->rid, recip, idtype, ctx)) in cms_RecipientInfo_ktri_init()
363 ktri->pkey = pk; in cms_RecipientInfo_ktri_init()
364 ktri->recip = recip; in cms_RecipientInfo_ktri_init()
367 ktri->pctx = EVP_PKEY_CTX_new_from_pkey(ossl_cms_ctx_get0_libctx(ctx), in cms_RecipientInfo_ktri_init()
368 ktri->pkey, in cms_RecipientInfo_ktri_init()
370 if (ktri->pctx == NULL) in cms_RecipientInfo_ktri_init()
372 if (EVP_PKEY_encrypt_init(ktri->pctx) <= 0) in cms_RecipientInfo_ktri_init()
451 CMS_KeyTransRecipientInfo *ktri; in CMS_RecipientInfo_ktri_get0_algs() local
457 ktri = ri->d.ktri; in CMS_RecipientInfo_ktri_get0_algs()
460 *pk = ktri->pkey; in CMS_RecipientInfo_ktri_get0_algs()
462 *recip = ktri->recip; in CMS_RecipientInfo_ktri_get0_algs()
464 *palg = ktri->keyEncryptionAlgorithm; in CMS_RecipientInfo_ktri_get0_algs()
473 CMS_KeyTransRecipientInfo *ktri; in CMS_RecipientInfo_ktri_get0_signer_id() local
478 ktri = ri->d.ktri; in CMS_RecipientInfo_ktri_get0_signer_id()
480 return ossl_cms_SignerIdentifier_get0_signer_id(ktri->rid, keyid, issuer, in CMS_RecipientInfo_ktri_get0_signer_id()
490 return ossl_cms_SignerIdentifier_cert_cmp(ri->d.ktri->rid, cert); in CMS_RecipientInfo_ktri_cert_cmp()
499 EVP_PKEY_free(ri->d.ktri->pkey); in CMS_RecipientInfo_set0_pkey()
500 ri->d.ktri->pkey = pkey; in CMS_RecipientInfo_set0_pkey()
509 CMS_KeyTransRecipientInfo *ktri; in cms_RecipientInfo_ktri_encrypt() local
522 ktri = ri->d.ktri; in cms_RecipientInfo_ktri_encrypt()
525 pctx = ktri->pctx; in cms_RecipientInfo_ktri_encrypt()
532 ktri->pkey, in cms_RecipientInfo_ktri_encrypt()
551 ASN1_STRING_set0(ktri->encryptedKey, ek, eklen); in cms_RecipientInfo_ktri_encrypt()
558 ktri->pctx = NULL; in cms_RecipientInfo_ktri_encrypt()
568 CMS_KeyTransRecipientInfo *ktri = ri->d.ktri; in cms_RecipientInfo_ktri_decrypt() local
569 EVP_PKEY *pkey = ktri->pkey; in cms_RecipientInfo_ktri_decrypt()
583 if (ktri->pkey == NULL) { in cms_RecipientInfo_ktri_decrypt()
613 ktri->pctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in cms_RecipientInfo_ktri_decrypt()
614 if (ktri->pctx == NULL) in cms_RecipientInfo_ktri_decrypt()
617 if (EVP_PKEY_decrypt_init(ktri->pctx) <= 0) in cms_RecipientInfo_ktri_decrypt()
628 EVP_PKEY_CTX_ctrl_str(ktri->pctx, "rsa_pkcs1_implicit_rejection", "0"); in cms_RecipientInfo_ktri_decrypt()
630 if (evp_pkey_decrypt_alloc(ktri->pctx, &ek, &eklen, fixlen, in cms_RecipientInfo_ktri_decrypt()
631 ktri->encryptedKey->data, in cms_RecipientInfo_ktri_decrypt()
632 ktri->encryptedKey->length) <= 0) in cms_RecipientInfo_ktri_decrypt()
642 EVP_PKEY_CTX_free(ktri->pctx); in cms_RecipientInfo_ktri_decrypt()
643 ktri->pctx = NULL; in cms_RecipientInfo_ktri_decrypt()
1103 || ri->d.ktri->version != 0) { in cms_env_set_version()