1CMS_GET1_RECEIPTREQUEST(3)          OpenSSL         CMS_GET1_RECEIPTREQUEST(3)
2
3
4

NAME

6       CMS_ReceiptRequest_create0, CMS_add1_ReceiptRequest,
7       CMS_get1_ReceiptRequest, CMS_ReceiptRequest_get0_values - CMS signed
8       receipt request functions
9

SYNOPSIS

11        #include <openssl/cms.h>
12
13        CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
14                                                       int allorfirst,
15                                                       STACK_OF(GENERAL_NAMES) *receiptList,
16                                                       STACK_OF(GENERAL_NAMES) *receiptsTo);
17        int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
18        int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
19        void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid,
20                                            int *pallorfirst,
21                                            STACK_OF(GENERAL_NAMES) **plist,
22                                            STACK_OF(GENERAL_NAMES) **prto);
23

DESCRIPTION

25       CMS_ReceiptRequest_create0() creates a signed receipt request
26       structure. The signedContentIdentifier field is set using id and idlen,
27       or it is set to 32 bytes of pseudo random data if id is NULL. If
28       receiptList is NULL the allOrFirstTier option in receiptsFrom is used
29       and set to the value of the allorfirst parameter. If receiptList is not
30       NULL the receiptList option in receiptsFrom is used. The receiptsTo
31       parameter specifies the receiptsTo field value.
32
33       The CMS_add1_ReceiptRequest() function adds a signed receipt request rr
34       to SignerInfo structure si.
35
36       int CMS_get1_ReceiptRequest() looks for a signed receipt request in si,
37       if any is found it is decoded and written to prr.
38
39       CMS_ReceiptRequest_get0_values() retrieves the values of a receipt
40       request.  The signedContentIdentifier is copied to pcid. If the
41       allOrFirstTier option of receiptsFrom is used its value is copied to
42       pallorfirst otherwise the receiptList field is copied to plist. The
43       receiptsTo parameter is copied to prto.
44

NOTES

46       For more details of the meaning of the fields see RFC2634.
47
48       The contents of a signed receipt should only be considered meaningful
49       if the corresponding CMS_ContentInfo structure can be successfully
50       verified using CMS_verify().
51

RETURN VALUES

53       CMS_ReceiptRequest_create0() returns a signed receipt request structure
54       or NULL if an error occurred.
55
56       CMS_add1_ReceiptRequest() returns 1 for success or 0 if an error
57       occurred.
58
59       CMS_get1_ReceiptRequest() returns 1 is a signed receipt request is
60       found and decoded. It returns 0 if a signed receipt request is not
61       present and -1 if it is present but malformed.
62

SEE ALSO

64       ERR_get_error(3), CMS_sign(3), CMS_sign_receipt(3), CMS_verify(3)
65       CMS_verify_receipt(3)
66
68       Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved.
69
70       Licensed under the OpenSSL license (the "License").  You may not use
71       this file except in compliance with the License.  You can obtain a copy
72       in the file LICENSE in the source distribution or at
73       <https://www.openssl.org/source/license.html>.
74
75
76
771.1.1                             2018-09-11        CMS_GET1_RECEIPTREQUEST(3)
Impressum