CMS_VERIFY_RECEIPT(3ossl)

πŸ’– CMS_VERIFY_RECEIPT πŸ’–

okay bestie, welcome to the CMS_verify_receipt page from the OpenSSL manual, section 3ossl πŸŽ€ she's a little one but she's important, so let's get into it ✨


🌸 NAME 🌸

CMS_verify_receipt β€” verify a CMS signed receipt πŸ§Ύβœ…


✨ SYNOPSIS ✨

#include <openssl/cms.h>

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

πŸ’… DESCRIPTION πŸ’…

So CMS_verify_receipt() does exactly what it says on the tin: it verifies a CMS signed receipt. Slay. 🫢

Here's the cast of characters, one by one, no skipping:

  • rcms β€” this is the signed receipt we're actually verifying. the main character of this function ngl πŸ‘‘
  • ocms β€” the original SignedData structure that contains the receipt request. like, the context, the backstory, the lore πŸ¦‹
  • certs β€” a set of certificates where we go looking for the signing certificate. think of it as the group chat we search for the right person in πŸ’¬
  • store β€” a trusted certificate store. this one's for chain verification, so it's the responsible adult in the room 🧚
  • flags β€” an optional set of flags that you can use to tweak the verify operation however you like ✨

πŸ“ NOTES πŸ“

This function lowkey behaves a lot like CMS_verify(), except β€” and this is the important part, no cap β€” these flag values are not supported:

  • CMS_DETACHED
  • CMS_BINARY
  • CMS_TEXT
  • CMS_STREAM

Why? because they genuinely don't make sense in the context of signed receipts. it's giving "wrong vibe, wrong era" πŸ’€ don't try to sneak them in.


🎯 RETURN VALUES 🎯

CMS_verify_receipt() returns 1 when the verification goes off without a hitch β€” icon behaviour, we love to see it πŸ’– β€” and returns zero if an error happened 😭

You can grab the error from ERR_get_error(3).


πŸ‘€ SEE ALSO πŸ‘€


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, we ate and left no crumbs πŸ“βœ¨ this was CMS_VERIFY_RECEIPT(3ossl) from version 3.5.9, dated 2026-09-29 β€” mwah, go verify some receipts πŸ’…πŸ«Ά

πŸ“¦ where this page comes from