CMS_EncryptedData_set1_key(3ssl)

CMS_EncryptedData_set1_key3ssl

Sets the cipher and key for cms encrypteddata

Usage

 #include <openssl/cms.h>
 int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
                                const unsigned char *key, size_t keylen);

Overview

CMS_EncryptedData_set1_key() takes in a cms EncryptedData object and sets the appropriate attributes to ciph, it makes a copy of the symmetric key of size keylen. AEAD cipher algorithms are not supported.

Return values

CMS_EncryptedData_set1_key() returns 0 if an error occurred otherwise returns 1.

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

From openssl 3.6.5-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.