---
name: "libressl-CMS_sign_receipt"
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_sign_receipt"
---

# libressl-CMS\_sign\_receipt(3)

create a CMS signed receipt

## NAME

**CMS\_sign\_receipt** – create a CMS signed receipt

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

*CMS\_ContentInfo* *\**\

**CMS\_sign\_receipt**(*CMS\_SignerInfo \*si*, *X509 \*signcert*, *EVP\_PKEY \*pkey*, *STACK\_OF(X509) \*certs*, *unsigned int flags*);

## DESCRIPTION

**CMS\_sign\_receipt**() creates a new CMS *SignedData* structure containing a signed *Receipt* as its embedded content. *si* is the *SignerInfo* structure containing the signed receipt request. *signcert* is the certificate to sign with, *pkey* is the corresponding private key. *certs* is an optional additional set of certificates to include in the CMS structure (for example any intermediate CAs in the chain).

This function behaves in a similar way to CMS\_sign(3) except that the *flags* values CMS\_DETACHED, CMS\_BINARY, CMS\_NOATTR, CMS\_TEXT, and CMS\_STREAM are not supported since they do not make sense in the context of signed receipts.

## RETURN VALUES

**CMS\_sign\_receipt**() returns either a valid *CMS\_ContentInfo* structure or NULL if an error occurred. The error can be obtained from ERR\_get\_error(3).

## SEE ALSO

CMS\_ContentInfo\_new(3), CMS\_get1\_ReceiptRequest(3), CMS\_sign(3), CMS\_verify\_receipt(3)

## STANDARDS

RFC 2634: Enhanced Security Services for S/MIME, section 2.8: Receipt Syntax

## HISTORY

**CMS\_sign\_receipt**() first appeared in OpenSSL 0.9.8h and has been available since OpenBSD 6.7.
