CMS_SIGN_RECEIPT(3ossl)

πŸ’– CMS_SIGN_RECEIPT πŸ’–

okay bestie, pull up a chair because we're talking about CMS_sign_receipt(3ossl) β€” yes that's the whole manual name, it's giving official document energy but we're gonna make it cute. This one lives in the openssl/cms.h cinematic universe and it's here to make you a CMS signed receipt. Slay. πŸŽ€


✨ NAME ✨

CMS_sign_receipt β€” literally just: create a CMS signed receipt. that's the whole job. iconic. πŸ’…


🌸 SYNOPSIS 🌸

#include <openssl/cms.h>

CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert,
                                  EVP_PKEY *pkey, STACK_OF(X509) *certs,
                                  unsigned int flags);

look at her. five arguments. no cap. πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

so CMS_sign_receipt() creates and returns a CMS signed receipt structure. that's the main character move right there. ✨

here's who's who in this little friend group:

  • si β€” the CMS_SignerInfo structure that's holding the signed receipt request. like, the ask itself. 🫢
  • signcert β€” the certificate you're signing with. your little ID badge. πŸŽ€
  • pkey β€” the corresponding private key. the matching key to that cert, they're a set, don't separate them. πŸ”‘
  • certs β€” an optional extra set of certificates to include in the CMS structure. for example, any intermediate CAs in the chain. optional! so you can pass it or not, no judgment. 🌈
  • flags β€” an optional set of flags. the vibe knobs. ⭐

πŸ‘‘ NOTES πŸ‘‘

this function behaves in a similar way to CMS_sign() except β€” and listen closely bestie because this is the important part β€” these flag values are not supported, because they just don't make sense in the context of signed receipts:

  • CMS_DETACHED
  • CMS_BINARY
  • CMS_NOATTR
  • CMS_TEXT
  • CMS_STREAM

so if you were about to pass one of those, don't. it's not a vibe. 🚫


πŸ’€ RETURN VALUES πŸ’€

CMS_sign_receipt() returns either a valid CMS_ContentInfo structure or NULL if an error occurred. 😭

if you got NULL, you can get the error from ERR_get_error(3). go read the receipt of your own mistakes, bestie. πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

the little family. go read them too. iykyk. πŸ’–


Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the whole page, bestie! this was CMS_SIGN_RECEIPT(3ossl) from OpenSSL 3.5.9, dated 2026-09-29 β€” thank you for coming to my ted talk, mwah, go sign some receipts πŸ’…πŸ’–πŸŒΈ

πŸ“¦ where this page comes from