CMS_VERIFY_RECEIPT(3SSL)

✨ NAME ✨

CMS_verify_receipt β€” bestie, this is the one that verifies a CMS signed receipt πŸ’– (yes, in the OpenSSL family, section 3SSL, she's that girl)


🌸 SYNOPSIS 🌸

#include <openssl/cms.h>

int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
                       const STACK_OF(X509) *certs, X509_STORE *store,
                       unsigned int flags);

okay so it's literally one function, four-ish args, no drama 🫢


πŸ’… DESCRIPTION πŸ’…

CMS_verify_receipt() verifies a CMS signed receipt. iconic behaviour, no cap.

Here's the breakdown of who's who in this little group chat:

  • rcms β€” this is the signed receipt you're verifying πŸ‘‘ the main character, the receipt itself.
  • ocms β€” the original SignedData structure that's holding the receipt request. like, the context, the backstory.
  • certs β€” a set of certificates you want it to search through to find the signing certificate πŸŽ€ hunting for the right one in the pile.
  • store β€” a trusted certificate store, used for chain verification. the trusted bestie, the vibes check πŸ”₯
  • flags β€” an optional set of flags that you can use to modify the verify operation ✨ it's giving "options, but make it optional."

πŸ¦‹ NOTES πŸ¦‹

This function behaves in a similar way to CMS_verify() β€” except (and this is the important bit, don't skip it) the flag values CMS_DETACHED, CMS_BINARY, CMS_TEXT and CMS_STREAM are NOT supported, because they literally do not make sense in the context of signed receipts. it's giving "wrong room, bestie" πŸ’€

so yeah. don't pass those. they don't apply. periodt.

🌈 RETURN VALUES 🌈

CMS_verify_receipt() returns 1 for a successful verification, and zero if an error occurred. slay or flop, binary, we love to see it πŸ’–

If an error happened, you can grab it from ERR_get_error(3). that's your receipt for the receipt, iykyk 😭


πŸ‘‘ SEE ALSO πŸ‘‘


Copyright 2008-2026 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>.


okay that's the whole thing, bestie πŸ’œ written for OpenSSL version 4.0.3, dated 2026-09-29, and yes the manual page is literally named CMS_VERIFY_RECEIPT(3SSL). go verify some receipts, you ate πŸ“πŸ§šπŸ’…

πŸ“¦ where this page comes from