1CMS_GET1_RECEIPTREQUEST(3ossl) OpenSSL CMS_GET1_RECEIPTREQUEST(3ossl)
2
3
4
6 CMS_ReceiptRequest_create0_ex, CMS_ReceiptRequest_create0,
7 CMS_add1_ReceiptRequest, CMS_get1_ReceiptRequest,
8 CMS_ReceiptRequest_get0_values - CMS signed receipt request functions
9
11 #include <openssl/cms.h>
12
13 CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
14 unsigned char *id, int idlen, int allorfirst,
15 STACK_OF(GENERAL_NAMES) *receiptList, STACK_OF(GENERAL_NAMES) *receiptsTo,
16 OSSL_LIB_CTX *libctx);
17 CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
18 unsigned char *id, int idlen, int allorfirst,
19 STACK_OF(GENERAL_NAMES) *receiptList, STACK_OF(GENERAL_NAMES) *receiptsTo);
20 int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
21 int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
22 void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid,
23 int *pallorfirst,
24 STACK_OF(GENERAL_NAMES) **plist,
25 STACK_OF(GENERAL_NAMES) **prto);
26
28 CMS_ReceiptRequest_create0_ex() creates a signed receipt request
29 structure. The signedContentIdentifier field is set using id and idlen,
30 or it is set to 32 bytes of pseudo random data if id is NULL. If
31 receiptList is NULL the allOrFirstTier option in receiptsFrom is used
32 and set to the value of the allorfirst parameter. If receiptList is not
33 NULL the receiptList option in receiptsFrom is used. The receiptsTo
34 parameter specifies the receiptsTo field value. The library context
35 libctx is used to find the public random generator.
36
37 CMS_ReceiptRequest_create0() is similar to
38 CMS_ReceiptRequest_create0_ex() but uses default values of NULL for the
39 library context libctx.
40
41 The CMS_add1_ReceiptRequest() function adds a signed receipt request rr
42 to SignerInfo structure si.
43
44 int CMS_get1_ReceiptRequest() looks for a signed receipt request in si,
45 if any is found it is decoded and written to prr.
46
47 CMS_ReceiptRequest_get0_values() retrieves the values of a receipt
48 request. The signedContentIdentifier is copied to pcid. If the
49 allOrFirstTier option of receiptsFrom is used its value is copied to
50 pallorfirst otherwise the receiptList field is copied to plist. The
51 receiptsTo parameter is copied to prto.
52
54 For more details of the meaning of the fields see RFC2634.
55
56 The contents of a signed receipt should only be considered meaningful
57 if the corresponding CMS_ContentInfo structure can be successfully
58 verified using CMS_verify().
59
61 CMS_ReceiptRequest_create0_ex() and CMS_ReceiptRequest_create0() return
62 a signed receipt request structure or NULL if an error occurred.
63
64 CMS_add1_ReceiptRequest() returns 1 for success or 0 if an error
65 occurred.
66
67 CMS_get1_ReceiptRequest() returns 1 is a signed receipt request is
68 found and decoded. It returns 0 if a signed receipt request is not
69 present and -1 if it is present but malformed.
70
72 ERR_get_error(3), CMS_sign(3), CMS_sign_receipt(3), CMS_verify(3)
73 CMS_verify_receipt(3)
74
76 The function CMS_ReceiptRequest_create0_ex() was added in OpenSSL 3.0.
77
79 Copyright 2008-2021 The OpenSSL Project Authors. All Rights Reserved.
80
81 Licensed under the Apache License 2.0 (the "License"). You may not use
82 this file except in compliance with the License. You can obtain a copy
83 in the file LICENSE in the source distribution or at
84 <https://www.openssl.org/source/license.html>.
85
86
87
883.0.9 2023-07-27 CMS_GET1_RECEIPTREQUEST(3ossl)