---
name: "libressl-CMS_ContentInfo_new"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-CMS_ContentInfo_new"
---

# libressl-CMS\_ContentInfo\_new(3)

Cryptographic Message Syntax data structures

## NAME

**CMS\_ContentInfo\_new**, **CMS\_ContentInfo\_free**, **CMS\_ContentInfo\_print\_ctx**, **CMS\_ReceiptRequest\_new**, **CMS\_ReceiptRequest\_free** – Cryptographic Message Syntax data structures

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/cms.h\>**

*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, representing an ASN.1 *ContentInfo* structure defined in RFC 5652 section 3. It can hold a pointer to an ASN.1 OBJECT IDENTIFIER and a pointer to either a *SignedData*, *EnvelopedData*, *DigestedData*, *EncryptedData*, *AuthenticatedData*, or *CompressedData* object or to an arbitrary ASN.1 object. **CMS\_ContentInfo\_free**() frees *cms*.

**CMS\_ContentInfo\_print\_ctx**() prints a human readable representation of *cms* to *out*.

**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, and a list of users to send the receipt to. **CMS\_ReceiptRequest\_free**() frees *rr*.

## RETURN VALUES

**CMS\_ContentInfo\_new**() and **CMS\_ReceiptRequest\_new**() return the new *CMS\_ContentInfo* or *CMS\_ReceiptRequest* object, respectively, or NULL if an error occurs.

## SEE ALSO

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)](/crypto/3.md), 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

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**() in OpenSSL 1.0.0. This function has been available since OpenBSD 6.7.
