diff options
Diffstat (limited to 'src/lib/libcrypto/man/CMS_get1_ReceiptRequest.3')
-rw-r--r-- | src/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 b/src/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 new file mode 100644 index 0000000000..d944f606d8 --- /dev/null +++ b/src/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 | |||
@@ -0,0 +1,175 @@ | |||
1 | .\" $OpenBSD: CMS_get1_ReceiptRequest.3,v 1.3 2019/08/10 23:41:22 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
5 | .\" Copyright (c) 2008 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: August 10 2019 $ | ||
52 | .Dt CMS_GET1_RECEIPTREQUEST 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm CMS_ReceiptRequest_create0 , | ||
56 | .Nm CMS_add1_ReceiptRequest , | ||
57 | .Nm CMS_get1_ReceiptRequest , | ||
58 | .Nm CMS_ReceiptRequest_get0_values | ||
59 | .Nd CMS signed receipt request functions | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/cms.h | ||
62 | .Ft CMS_ReceiptRequest * | ||
63 | .Fo CMS_ReceiptRequest_create0 | ||
64 | .Fa "unsigned char *id" | ||
65 | .Fa "int idlen" | ||
66 | .Fa "int allorfirst" | ||
67 | .Fa "STACK_OF(GENERAL_NAMES) *receiptList" | ||
68 | .Fa "STACK_OF(GENERAL_NAMES) *receiptsTo" | ||
69 | .Fc | ||
70 | .Ft int | ||
71 | .Fo CMS_add1_ReceiptRequest | ||
72 | .Fa "CMS_SignerInfo *si" | ||
73 | .Fa "CMS_ReceiptRequest *rr" | ||
74 | .Fc | ||
75 | .Ft int | ||
76 | .Fo CMS_get1_ReceiptRequest | ||
77 | .Fa "CMS_SignerInfo *si" | ||
78 | .Fa "CMS_ReceiptRequest **prr" | ||
79 | .Fc | ||
80 | .Ft void | ||
81 | .Fo CMS_ReceiptRequest_get0_values | ||
82 | .Fa "CMS_ReceiptRequest *rr" | ||
83 | .Fa "ASN1_STRING **pcid" | ||
84 | .Fa "int *pallorfirst" | ||
85 | .Fa "STACK_OF(GENERAL_NAMES) **plist" | ||
86 | .Fa "STACK_OF(GENERAL_NAMES) **prto" | ||
87 | .Fc | ||
88 | .Sh DESCRIPTION | ||
89 | .Fn CMS_ReceiptRequest_create0 | ||
90 | creates a signed receipt request structure. | ||
91 | The signedContentIdentifier field is set using | ||
92 | .Fa id | ||
93 | and | ||
94 | .Fa idlen , | ||
95 | or it is set to 32 bytes of pseudo random data if | ||
96 | .Fa id | ||
97 | is | ||
98 | .Dv NULL . | ||
99 | If | ||
100 | .Fa receiptList | ||
101 | is | ||
102 | .Dv NULL , | ||
103 | the allOrFirstTier option in receiptsFrom | ||
104 | is used and set to the value of the | ||
105 | .Fa allorfirst | ||
106 | parameter. | ||
107 | If | ||
108 | .Fa receiptList | ||
109 | is not | ||
110 | .Dv NULL , | ||
111 | the receiptList option in receiptsFrom is used. | ||
112 | The | ||
113 | .Fa receiptsTo | ||
114 | parameter specifies the receiptsTo field value. | ||
115 | .Pp | ||
116 | The | ||
117 | .Fn CMS_add1_ReceiptRequest | ||
118 | function adds a signed receipt request | ||
119 | .Fa rr | ||
120 | to the | ||
121 | .Vt CMS_SignerInfo | ||
122 | structure | ||
123 | .Fa si . | ||
124 | .Pp | ||
125 | .Fn CMS_get1_ReceiptRequest | ||
126 | looks for a signed receipt request in | ||
127 | .Fa si . | ||
128 | If any is found, it is decoded and written to | ||
129 | .Fa prr . | ||
130 | .Pp | ||
131 | .Fn CMS_ReceiptRequest_get0_values | ||
132 | retrieves the values of a receipt request. | ||
133 | The signedContentIdentifier is copied to | ||
134 | .Fa pcid . | ||
135 | If the allOrFirstTier option of receiptsFrom is used, | ||
136 | its value is copied to | ||
137 | .Fa pallorfirst ; | ||
138 | otherwise the receiptList field is copied to | ||
139 | .Fa plist . | ||
140 | The receiptsTo parameter is copied to | ||
141 | .Fa prto . | ||
142 | .Pp | ||
143 | For more details on the meaning of the fields see RFC2634. | ||
144 | .Pp | ||
145 | The contents of a signed receipt should only be considered meaningful if | ||
146 | the corresponding | ||
147 | .Vt CMS_ContentInfo | ||
148 | structure can be successfully verified using | ||
149 | .Xr CMS_verify 3 . | ||
150 | .Sh RETURN VALUES | ||
151 | .Fn CMS_ReceiptRequest_create0 | ||
152 | returns a signed receipt request structure or | ||
153 | .Dv NULL | ||
154 | if an error occurred. | ||
155 | .Pp | ||
156 | .Fn CMS_add1_ReceiptRequest | ||
157 | returns 1 for success or 0 if an error occurred. | ||
158 | .Pp | ||
159 | .Fn CMS_get1_ReceiptRequest | ||
160 | returns 1 is a signed receipt request is found and decoded. | ||
161 | It returns 0 if a signed receipt request is not present or -1 if it is | ||
162 | present but malformed. | ||
163 | .Sh SEE ALSO | ||
164 | .Xr CMS_sign 3 , | ||
165 | .Xr CMS_sign_receipt 3 , | ||
166 | .Xr CMS_verify 3 , | ||
167 | .Xr CMS_verify_receipt 3 , | ||
168 | .Xr ERR_get_error 3 | ||
169 | .Sh HISTORY | ||
170 | .Fn CMS_ReceiptRequest_create0 , | ||
171 | .Fn CMS_add1_ReceiptRequest , | ||
172 | .Fn CMS_get1_ReceiptRequest , | ||
173 | and | ||
174 | .Fn CMS_ReceiptRequest_get0_values | ||
175 | were added to OpenSSL 0.9.8. | ||