]>
Commit | Line | Data |
---|---|---|
6469a1fd DSH |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
bb9ad09e | 5 | CMS_ReceiptRequest_create0, CMS_add1_ReceiptRequest, CMS_get1_ReceiptRequest, CMS_ReceiptRequest_get0_values - CMS signed receipt request functions |
6469a1fd DSH |
6 | |
7 | =head1 SYNOPSIS | |
8 | ||
9 | #include <openssl/cms.h> | |
10 | ||
e9b77246 BB |
11 | CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen, |
12 | int allorfirst, | |
13 | STACK_OF(GENERAL_NAMES) *receiptList, | |
14 | STACK_OF(GENERAL_NAMES) *receiptsTo); | |
38d3a738 DSH |
15 | int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr); |
16 | int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr); | |
e9b77246 BB |
17 | void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid, |
18 | int *pallorfirst, | |
19 | STACK_OF(GENERAL_NAMES) **plist, | |
20 | STACK_OF(GENERAL_NAMES) **prto); | |
6469a1fd DSH |
21 | |
22 | =head1 DESCRIPTION | |
23 | ||
24 | CMS_ReceiptRequest_create0() creates a signed receipt request structure. The | |
25 | B<signedContentIdentifier> field is set using B<id> and B<idlen>, or it is set | |
26 | to 32 bytes of pseudo random data if B<id> is NULL. If B<receiptList> is NULL | |
27 | the allOrFirstTier option in B<receiptsFrom> is used and set to the value of | |
28 | the B<allorfirst> parameter. If B<receiptList> is not NULL the B<receiptList> | |
29 | option in B<receiptsFrom> is used. The B<receiptsTo> parameter specifies the | |
30 | B<receiptsTo> field value. | |
31 | ||
32 | The CMS_add1_ReceiptRequest() function adds a signed receipt request B<rr> | |
c420fab5 | 33 | to SignerInfo structure B<si>. |
6469a1fd DSH |
34 | |
35 | int CMS_get1_ReceiptRequest() looks for a signed receipt request in B<si>, if | |
36 | any is found it is decoded and written to B<prr>. | |
37 | ||
38 | CMS_ReceiptRequest_get0_values() retrieves the values of a receipt request. | |
39 | The signedContentIdentifier is copied to B<pcid>. If the B<allOrFirstTier> | |
40 | option of B<receiptsFrom> is used its value is copied to B<pallorfirst> | |
41 | otherwise the B<receiptList> field is copied to B<plist>. The B<receiptsTo> | |
42 | parameter is copied to B<prto>. | |
43 | ||
44 | =head1 NOTES | |
45 | ||
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 if the | |
49 | corresponding CMS_ContentInfo structure can be successfully verified using | |
50 | CMS_verify(). | |
51 | ||
52 | =head1 RETURN VALUES | |
53 | ||
1bc74519 | 54 | CMS_ReceiptRequest_create0() returns a signed receipt request structure or |
6469a1fd DSH |
55 | NULL if an error occurred. |
56 | ||
57 | CMS_add1_ReceiptRequest() returns 1 for success or 0 is an error occurred. | |
58 | ||
59 | CMS_get1_ReceiptRequest() returns 1 is a signed receipt request is found and | |
60 | decoded. It returns 0 if a signed receipt request is not present and -1 if | |
61 | it is present but malformed. | |
62 | ||
63 | =head1 SEE ALSO | |
64 | ||
9b86974e RS |
65 | L<ERR_get_error(3)>, L<CMS_sign(3)>, |
66 | L<CMS_sign_receipt(3)>, L<CMS_verify(3)> | |
67 | L<CMS_verify_receipt(3)> | |
6469a1fd | 68 | |
e2f92610 RS |
69 | =head1 COPYRIGHT |
70 | ||
71 | Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. | |
72 | ||
73 | Licensed under the OpenSSL license (the "License"). You may not use | |
74 | this file except in compliance with the License. You can obtain a copy | |
75 | in the file LICENSE in the source distribution or at | |
76 | L<https://www.openssl.org/source/license.html>. | |
77 | ||
78 | =cut |