• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/openssl-1.0.2h/crypto/cms/

Lines Matching defs:kari

83         *palg = ri->d.kari->keyEncryptionAlgorithm;
85 *pukm = ri->d.kari->ukm;
89 /* Retrieve recipient encrypted keys from a kari */
99 return ri->d.kari->recipientEncryptedKeys;
115 oik = ri->d.kari->originator;
152 oik = ri->d.kari->originator;
209 CMS_KeyAgreeRecipientInfo *kari = ri->d.kari;
210 if (kari->pctx) {
211 EVP_PKEY_CTX_free(kari->pctx);
212 kari->pctx = NULL;
219 kari->pctx = pctx;
230 return &ri->d.kari->ctx;
241 CMS_KeyAgreeRecipientInfo *kari, int enc)
249 keklen = EVP_CIPHER_CTX_key_length(&kari->ctx);
253 if (EVP_PKEY_derive(kari->pctx, kek, &keklen) <= 0)
256 if (!EVP_CipherInit_ex(&kari->ctx, NULL, NULL, kek, NULL, enc))
259 if (!EVP_CipherUpdate(&kari->ctx, NULL, &outlen, in, inlen))
264 if (!EVP_CipherUpdate(&kari->ctx, out, &outlen, in, inlen))
274 EVP_CIPHER_CTX_cleanup(&kari->ctx);
275 EVP_PKEY_CTX_free(kari->pctx);
276 kari->pctx = NULL;
295 if (!cms_kek_cipher(&cek, &ceklen, enckey, enckeylen, ri->d.kari, 0))
313 static int cms_kari_create_ephemeral_key(CMS_KeyAgreeRecipientInfo *kari,
332 kari->pctx = pctx;
347 CMS_KeyAgreeRecipientInfo *kari;
350 ri->d.kari = M_ASN1_new_of(CMS_KeyAgreeRecipientInfo);
351 if (!ri->d.kari)
355 kari = ri->d.kari;
356 kari->version = 3;
359 if (!sk_CMS_RecipientEncryptedKey_push(kari->recipientEncryptedKeys, rek)) {
378 if (!cms_kari_create_ephemeral_key(kari, pk))
386 static int cms_wrap_init(CMS_KeyAgreeRecipientInfo *kari,
389 EVP_CIPHER_CTX *ctx = &kari->ctx;
420 CMS_KeyAgreeRecipientInfo *kari;
430 kari = ri->d.kari;
431 reks = kari->recipientEncryptedKeys;
434 if (!cms_wrap_init(kari, ec->cipher))
440 if (kari->originator->type == -1) {
441 CMS_OriginatorIdentifierOrKey *oik = kari->originator;
455 if (EVP_PKEY_derive_set_peer(kari->pctx, rek->pkey) <= 0)
458 kari, 1))