CMS_CONTENTINFO_NEW(3)
π CMS_CONTENTINFO_NEW(3) β okay bestie, let's talk CMS structs
So this is a page from the Library Functions Manual, and the star of the show is CMS_CONTENTINFO_NEW(3). It's giving crypto-girlie energy: we're talking Cryptographic Message Syntax data structures, from libcrypto. Buckle up, this is actually so good. π
β¨ NAME β¨
CMS_ContentInfo_new, CMS_ContentInfo_free, CMS_ContentInfo_print_ctx, CMS_ReceiptRequest_new, CMS_ReceiptRequest_free β all the Cryptographic Message Syntax data structure girlies. π¦
πΈ SYNOPSIS πΈ
Like, the library is libcrypto, and you gotta include the header first, obviously:
#include <openssl/cms.h>
Then, the functions, one by one, no cap:
CMS_ContentInfo *
CMS_ContentInfo_new(void);
void
CMS_ContentInfo_free(CMS_ContentInfo *cms);
int
CMS_ContentInfo_print_ctx(BIO *out, CMS_ContentInfo *cms, int indent,
const ASN1_PCTX *pctx);
CMS_ReceiptRequest *
CMS_ReceiptRequest_new(void);
void
CMS_ReceiptRequest_free(CMS_ReceiptRequest *rr);
π§ DESCRIPTION π§
CMS_ContentInfo_new() allocates and initializes an empty CMS_ContentInfo object β literally brand new, no thoughts, head empty β and that object represents an ASN.1 ContentInfo structure defined in RFC 5652 section 3. π«
This thing can hold a pointer to an ASN.1 OBJECT IDENTIFIER, plus a pointer to either a SignedData, EnvelopedData, DigestedData, EncryptedData, AuthenticatedData, or CompressedData object β or, if it's feeling quirky, to an arbitrary ASN.1 object. So many options, all valid, we love a flexible icon. π
CMS_ContentInfo_free() frees cms. Bye bestie, thanks for the memories. π
CMS_ContentInfo_print_ctx() prints a human-readable representation of cms to out. Like a little glow-up so you can actually read it.
CMS_ReceiptRequest_new() allocates and initializes an empty CMS_ReceiptRequest object, representing an ASN.1 ReceiptRequest structure defined in RFC 2634 section 2.7. It can contain:
- a content identifier π
- a list of recipients requested to return a signed receipt π
- a list of users to send the receipt to π«Ά
CMS_ReceiptRequest_free() frees rr. Another one released into the wild. β¨
π₯ RETURN VALUES π₯
CMS_ContentInfo_new() and CMS_ReceiptRequest_new() return the new CMS_ContentInfo or CMS_ReceiptRequest object, respectively β iconic, successful, glowing.
Or they return NULL if an error occurs. π And yeah, you should check for that, bestie. NULL is not the vibe.
π¦ SEE ALSO π¦
The whole friend group, honestly:
BIO_new_CMS(3), CMS_add0_cert(3), CMS_add1_recipient_cert(3), CMS_add1_signer(3), CMS_compress(3), CMS_decrypt(3), CMS_encrypt(3), CMS_final(3), CMS_get0_RecipientInfos(3), CMS_get0_SignerInfos(3), CMS_get0_type(3), CMS_get1_ReceiptRequest(3), CMS_sign(3), CMS_sign_receipt(3), CMS_signed_add1_attr(3), CMS_uncompress(3), CMS_verify(3), CMS_verify_receipt(3), crypto(3), d2i_CMS_ContentInfo(3), i2d_CMS_bio_stream(3), PEM_read_bio_PrivateKey(3), PEM_write_bio_CMS_stream(3), SMIME_read_CMS(3), SMIME_write_CMS(3)
π STANDARDS π
The receipts, literally:
- RFC 5652: Cryptographic Message Syntax, section 3: General Syntax
- RFC 3274: Compressed Data Content Type for Cryptographic Message Syntax (CMS)
- RFC 2634: Enhanced Security Services for S/MIME, section 2.7: Receipt Request Syntax
π HISTORY π
CMS_ContentInfo_new(), CMS_ContentInfo_free(), CMS_ReceiptRequest_new(), and CMS_ReceiptRequest_free() first appeared in OpenSSL 0.9.8h, and CMS_ContentInfo_print_ctx() showed up in OpenSSL 1.0.0. This function has been available since OpenBSD 6.7. A whole glow-up timeline, honestly. β
And that's the tea, bestie β go forth and CMS responsibly. π
Mwah π β this page is served up from Debian, dated December 20, 2025. Catch you in the next manpage! πβ¨
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms