CMS_SIGN_RECEIPT(3)
π
CMS_SIGN_RECEIPT(3) β like, the cute little libcrypto manual page, bestie
okay so picture this: you're deep in the OpenSSL headers, right? This is a page from the Library Functions Manual and it's all about making a signed receipt. Yes, receipts. Like when you need proof someone got your mail. Obsessed. Let's get into it π§
β¨ NAME β¨
CMS_sign_receipt β bestie, it literally creates a CMS signed receipt π
π¦ SYNOPSIS π¦
library βlibcryptoβ #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 πΈ
So CMS_sign_receipt() does the thing: it creates a brand new CMS SignedData structure, and its embedded content is a signed Receipt. Iconic behavior, honestly.
Let's break down the cast of characters (the args, bestie, keep up π«Ά):
siβ theSignerInfostructure that's holding the signed receipt request. She's the main character.signcertβ the certificate you're signing with βοΈpkeyβ the matching private key for that cert. yes they're a package deal, no cap.certsβ an optional extra set of certificates to shove into the CMS structure (like, say, any intermediate CAs hanging out in the chain). optional means optional, but she's there if you need her πflagsβ the flags. but read the next bit, because not all flags are welcome here.
The tea β: this function behaves similarly to CMS_sign(3), except that these flags values are not supported:
CMS_DETACHEDCMS_BINARYCMS_NOATTRCMS_TEXTCMS_STREAM
Why? Because they literally do not make sense in the context of signed receipts. It's giving "wrong vibe, wrong party." So don't pass them. Fr fr. π
π RETURN VALUES π
CMS_sign_receipt() returns either a valid CMS_ContentInfo structure (slay) or NULL if an error occurred (π). If you got NULL, you can grab the error from ERR_get_error(3). Go check, don't just sit there wondering.
π₯ SEE ALSO π₯
the whole friend group, honestly. go read them too π
β STANDARDS β
RFC 2634: Enhanced Security Services for S/MIME, section 2.8: Receipt Syntax. yes, we cite our sources, we're classy like that π
π¦ HISTORY π¦
CMS_sign_receipt() first appeared in OpenSSL 0.9.8h and has been available since OpenBSD 6.7. a whole little timeline, we love a glow-up β¨
and that's the page, bestie π this cutie came from Debian, dated December 20, 2025 β the CMS_SIGN_RECEIPT(3) of it all. drink some water, go sign a receipt, periodt π«Ά
π¦ 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) 2008 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms