Lines Matching refs:pwri
25 CMS_PasswordRecipientInfo *pwri; in CMS_RecipientInfo_set0_password() local
31 pwri = ri->d.pwri; in CMS_RecipientInfo_set0_password()
32 pwri->pass = pass; in CMS_RecipientInfo_set0_password()
35 pwri->passlen = passlen; in CMS_RecipientInfo_set0_password()
49 CMS_PasswordRecipientInfo *pwri; in CMS_add0_recipient_password() local
135 ri->d.pwri = M_ASN1_new_of(CMS_PasswordRecipientInfo); in CMS_add0_recipient_password()
136 if (ri->d.pwri == NULL) { in CMS_add0_recipient_password()
142 pwri = ri->d.pwri; in CMS_add0_recipient_password()
143 pwri->cms_ctx = cms_ctx; in CMS_add0_recipient_password()
145 X509_ALGOR_free(pwri->keyEncryptionAlgorithm); in CMS_add0_recipient_password()
146 pwri->keyEncryptionAlgorithm = X509_ALGOR_new(); in CMS_add0_recipient_password()
147 if (pwri->keyEncryptionAlgorithm == NULL) { in CMS_add0_recipient_password()
151 pwri->keyEncryptionAlgorithm->algorithm = OBJ_nid2obj(wrap_nid); in CMS_add0_recipient_password()
152 pwri->keyEncryptionAlgorithm->parameter = ASN1_TYPE_new(); in CMS_add0_recipient_password()
153 if (pwri->keyEncryptionAlgorithm->parameter == NULL) { in CMS_add0_recipient_password()
159 &pwri->keyEncryptionAlgorithm->parameter-> in CMS_add0_recipient_password()
164 pwri->keyEncryptionAlgorithm->parameter->type = V_ASN1_SEQUENCE; in CMS_add0_recipient_password()
171 pwri->keyDerivationAlgorithm = PKCS5_pbkdf2_set(iter, NULL, 0, -1, -1); in CMS_add0_recipient_password()
173 if (pwri->keyDerivationAlgorithm == NULL) in CMS_add0_recipient_password()
177 pwri->version = 0; in CMS_add0_recipient_password()
311 CMS_PasswordRecipientInfo *pwri; in ossl_cms_RecipientInfo_pwri_crypt() local
323 pwri = ri->d.pwri; in ossl_cms_RecipientInfo_pwri_crypt()
325 if (pwri->pass == NULL) { in ossl_cms_RecipientInfo_pwri_crypt()
329 algtmp = pwri->keyEncryptionAlgorithm; in ossl_cms_RecipientInfo_pwri_crypt()
367 algtmp = pwri->keyDerivationAlgorithm; in ossl_cms_RecipientInfo_pwri_crypt()
372 (char *)pwri->pass, pwri->passlen, in ossl_cms_RecipientInfo_pwri_crypt()
392 pwri->encryptedKey->data = key; in ossl_cms_RecipientInfo_pwri_crypt()
393 pwri->encryptedKey->length = keylen; in ossl_cms_RecipientInfo_pwri_crypt()
395 key = OPENSSL_malloc(pwri->encryptedKey->length); in ossl_cms_RecipientInfo_pwri_crypt()
399 pwri->encryptedKey->data, in ossl_cms_RecipientInfo_pwri_crypt()
400 pwri->encryptedKey->length, kekctx)) { in ossl_cms_RecipientInfo_pwri_crypt()