Lines Matching refs:eklen
94 size_t eklen; in pkcs7_encode_rinfo() local
114 if (EVP_PKEY_encrypt(pctx, NULL, &eklen, key, keylen) <= 0) in pkcs7_encode_rinfo()
117 ek = OPENSSL_malloc(eklen); in pkcs7_encode_rinfo()
124 if (EVP_PKEY_encrypt(pctx, ek, &eklen, key, keylen) <= 0) in pkcs7_encode_rinfo()
127 ASN1_STRING_set0(ri->enc_key, ek, eklen); in pkcs7_encode_rinfo()
145 size_t eklen; in pkcs7_decrypt_rinfo() local
162 if (EVP_PKEY_decrypt(pctx, NULL, &eklen, in pkcs7_decrypt_rinfo()
166 ek = OPENSSL_malloc(eklen); in pkcs7_decrypt_rinfo()
173 if (EVP_PKEY_decrypt(pctx, ek, &eklen, in pkcs7_decrypt_rinfo()
175 || eklen == 0 in pkcs7_decrypt_rinfo()
176 || (fixlen != 0 && eklen != fixlen)) { in pkcs7_decrypt_rinfo()
186 *peklen = eklen; in pkcs7_decrypt_rinfo()
373 int eklen = 0, tkeylen = 0; in PKCS7_dataDecode() local
505 if (pkcs7_decrypt_rinfo(&ek, &eklen, ri, pkey, in PKCS7_dataDecode()
512 if (pkcs7_decrypt_rinfo(&ek, &eklen, ri, pkey, 0) < 0) in PKCS7_dataDecode()
532 eklen = tkeylen; in PKCS7_dataDecode()
536 if (eklen != EVP_CIPHER_CTX_key_length(evp_ctx)) { in PKCS7_dataDecode()
542 if (!EVP_CIPHER_CTX_set_key_length(evp_ctx, eklen)) { in PKCS7_dataDecode()
544 OPENSSL_clear_free(ek, eklen); in PKCS7_dataDecode()
546 eklen = tkeylen; in PKCS7_dataDecode()
555 OPENSSL_clear_free(ek, eklen); in PKCS7_dataDecode()
585 OPENSSL_clear_free(ek, eklen); in PKCS7_dataDecode()