CMS_ENCRYPT(3ssl) OpenSSL CMS_ENCRYPT(3ssl) CMS_encrypt_ex CMS_encrypt - CMS envelopedData #include CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, unsigned int flags, OSSL_LIB_CTX *libctx, const char *propq); CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, unsigned int flags); CMS_encrypt_ex() CMS EnvelopedData AuthEnvelopedData. certs . in . cipher . flags . libctx propq . RSA Diffie-Hellman EC . EVP_des_ede3_cbc() (DES ) S/MIME . cipher ASN1 . GCM AuthEnvelopedData MAC. EnvelopedData. AES GCM AEAD . " " envelopedData S/MIME S/MIME. S/MIME BIO CMS_encrypt(). flags. CMS_TEXT MIME text/plain . MIME ( S/MIME) CMS_BINARY . . CMS_BINARY CMS_TEXT. OpenSSL . CMS_USE_KEYID . . CMS_STREAM CMS_ContentInfo /: BIO in. CMS_PARTIAL CMS_ContentInfo . CMS_ContentInfo CMS_DETACHED . SMIME_write_CMS(). CMS_STREAM CMS_ContentInfo CMS_ContentInfo . SMIME_write_CMS() i2d_CMS_bio_stream() PEM_write_bio_CMS_stream() . ASN1 BIO BIO_new_CMS(). certs CMS KeyTransRecipientInfo. KEKRecipientInfo CMS_PARTIAL CMS_add0_recipient_key(). KEMRecipientInfo CMS_PARTIAL CMS_add1_recipient(). certs NULL CMS_PARTIAL CMS_add1_recipient() CMS_add1_recipient_cert() CMS_add0_recipient_key(). CMS_encrypt() CMS_encrypt_ex() NULL libctx propq. CMS_encrypt_ex() CMS_encrypt() CMS_ContentInfo NULL . ERR_get_error(3). ERR_get_error(3) CMS_decrypt(3) CMS_encrypt_ex() OpenSSL 3.0. CMS_STREAM OpenSSL 1.0.0. 2008-2025 OpenSSL. . Apache 2.0 ( ""). . LICENSE . 3 . . : . 3.6.2 7 2026 CMS_ENCRYPT(3ssl)