diff options
author | schwarze <> | 2019-08-17 15:23:26 +0000 |
---|---|---|
committer | schwarze <> | 2019-08-17 15:23:26 +0000 |
commit | 34632f990b58b7428f0342e7233269b003e3008c (patch) | |
tree | 53b8a945c3d7056e50a9e271f26c602600e856c5 /src | |
parent | 828cf47420406660396ab34261a41d0fcd3ec1bb (diff) | |
download | openbsd-34632f990b58b7428f0342e7233269b003e3008c.tar.gz openbsd-34632f990b58b7428f0342e7233269b003e3008c.tar.bz2 openbsd-34632f990b58b7428f0342e7233269b003e3008c.zip |
some cleanup:
* add the missing STANDARDS section
* more precision below RETURN VALUES
* simplify some overly verbose text
* mark up ASN.1 type names
* and minor wording improvements and typo fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/CMS_get0_SignerInfos.3 | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/src/lib/libcrypto/man/CMS_get0_SignerInfos.3 b/src/lib/libcrypto/man/CMS_get0_SignerInfos.3 index 8f98c181ab..70cb1c2c1e 100644 --- a/src/lib/libcrypto/man/CMS_get0_SignerInfos.3 +++ b/src/lib/libcrypto/man/CMS_get0_SignerInfos.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: CMS_get0_SignerInfos.3,v 1.4 2019/08/11 12:46:38 schwarze Exp $ | 1 | .\" $OpenBSD: CMS_get0_SignerInfos.3,v 1.5 2019/08/17 15:23:26 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 | 2 | .\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
@@ -48,7 +48,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 50 | .\" |
51 | .Dd $Mdocdate: August 11 2019 $ | 51 | .Dd $Mdocdate: August 17 2019 $ |
52 | .Dt CMS_GET0_SIGNERINFOS 3 | 52 | .Dt CMS_GET0_SIGNERINFOS 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -57,7 +57,7 @@ | |||
57 | .Nm CMS_SignerInfo_get0_signature , | 57 | .Nm CMS_SignerInfo_get0_signature , |
58 | .Nm CMS_SignerInfo_cert_cmp , | 58 | .Nm CMS_SignerInfo_cert_cmp , |
59 | .Nm CMS_SignerInfo_set1_signer_cert | 59 | .Nm CMS_SignerInfo_set1_signer_cert |
60 | .Nd CMS signedData signer functions | 60 | .Nd CMS SignedData signer functions |
61 | .Sh SYNOPSIS | 61 | .Sh SYNOPSIS |
62 | .In openssl/cms.h | 62 | .In openssl/cms.h |
63 | .Ft STACK_OF(CMS_SignerInfo) * | 63 | .Ft STACK_OF(CMS_SignerInfo) * |
@@ -78,7 +78,7 @@ | |||
78 | .Ft int | 78 | .Ft int |
79 | .Fo CMS_SignerInfo_cert_cmp | 79 | .Fo CMS_SignerInfo_cert_cmp |
80 | .Fa "CMS_SignerInfo *si" | 80 | .Fa "CMS_SignerInfo *si" |
81 | .Fa "X509 *cert" | 81 | .Fa "X509 *certificate" |
82 | .Fc | 82 | .Fc |
83 | .Ft void | 83 | .Ft void |
84 | .Fo CMS_SignerInfo_set1_signer_cert | 84 | .Fo CMS_SignerInfo_set1_signer_cert |
@@ -86,96 +86,98 @@ | |||
86 | .Fa "X509 *signer" | 86 | .Fa "X509 *signer" |
87 | .Fc | 87 | .Fc |
88 | .Sh DESCRIPTION | 88 | .Sh DESCRIPTION |
89 | The function | ||
90 | .Fn CMS_get0_SignerInfos | 89 | .Fn CMS_get0_SignerInfos |
91 | returns all the | 90 | returns all the |
92 | .Vt CMS_SignerInfo | 91 | .Vt SignerInfo |
93 | structures associated with a CMS signedData structure. | 92 | structures associated with the |
93 | .Vt SignedData | ||
94 | structure | ||
95 | .Fa cms . | ||
94 | .Pp | 96 | .Pp |
95 | .Fn CMS_SignerInfo_get0_signer_id | 97 | .Fn CMS_SignerInfo_get0_signer_id |
96 | retrieves the certificate signer identifier associated with a specific | 98 | retrieves the certificate |
97 | .Vt CMS_SignerInfo | 99 | .Vt SignerIdentifier |
100 | associated with the | ||
101 | .Vt SignerInfo | ||
98 | structure | 102 | structure |
99 | .Fa si . | 103 | .Fa si . |
100 | Either the keyidentifier will be set in | 104 | Either the |
105 | .Vt SubjectKeyIdentifier | ||
106 | will be set in | ||
101 | .Fa keyid | 107 | .Fa keyid |
102 | or | 108 | or both issuer name and serial number in |
103 | .Em both | ||
104 | issuer name and serial number in | ||
105 | .Fa issuer | 109 | .Fa issuer |
106 | and | 110 | and |
107 | .Fa sno . | 111 | .Fa sno . |
108 | .Pp | 112 | .Pp |
109 | .Fn CMS_SignerInfo_get0_signature | 113 | .Fn CMS_SignerInfo_get0_signature |
110 | retrieves the signature associated with | 114 | retrieves the |
111 | .Fa si | 115 | .Fa signature |
112 | in a pointer to an | 116 | field of |
113 | .Vt ASN1_OCTET_STRING | 117 | .Fa si . |
114 | structure. | 118 | The application program is allowed to modify the data pointed to. |
115 | This pointer returned corresponds to the internal signature value of | ||
116 | .Fa si | ||
117 | so it may be read or modified. | ||
118 | .Pp | 119 | .Pp |
119 | .Fn CMS_SignerInfo_cert_cmp | 120 | .Fn CMS_SignerInfo_cert_cmp |
120 | compares the certificate | 121 | compares the |
121 | .Fa cert | 122 | .Fa certificate |
122 | against the signer identifier | 123 | against the signer identifier of |
123 | .Fa si . | 124 | .Fa si . |
124 | It returns zero if the comparison is successful or non-zero if not. | ||
125 | .Pp | 125 | .Pp |
126 | .Fn CMS_SignerInfo_set1_signer_cert | 126 | .Fn CMS_SignerInfo_set1_signer_cert |
127 | sets the signers certificate of | 127 | sets the signer certificate of |
128 | .Fa si | 128 | .Fa si |
129 | to | 129 | to |
130 | .Fa signer . | 130 | .Fa signer . |
131 | .Pp | 131 | .Pp |
132 | The main purpose of these functions is to enable an application to | 132 | The main purpose of these functions is to enable an application to |
133 | lookup signers certificates using any appropriate technique when the | 133 | look up signer certificates using any appropriate technique when the |
134 | simpler method of | 134 | simpler method of |
135 | .Xr CMS_verify 3 | 135 | .Xr CMS_verify 3 |
136 | is not appropriate. | 136 | is not appropriate. |
137 | .Pp | 137 | .Pp |
138 | In typical usage an application will retrieve all | 138 | In typical usage, an application retrieves all |
139 | .Vt CMS_SignerInfo | 139 | .Vt CMS_SignerInfo |
140 | structures using | 140 | structures using |
141 | .Fn CMS_get0_SignerInfos | 141 | .Fn CMS_get0_SignerInfos |
142 | and retrieve the identifier information using CMS. | 142 | and retrieves the identifier information using CMS. |
143 | It will then obtain the signer certificate by some unspecified means | 143 | It will then obtain the signer certificate by some unspecified means |
144 | (or return and error if it cannot be found) and set it using | 144 | (or return and error if it cannot be found) and set it using |
145 | .Fn CMS_SignerInfo_set1_signer_cert . | 145 | .Fn CMS_SignerInfo_set1_signer_cert . |
146 | .Pp | ||
147 | Once all signer certificates have been set, | 146 | Once all signer certificates have been set, |
148 | .Xr CMS_verify 3 | 147 | .Xr CMS_verify 3 |
149 | can be used. | 148 | can be used. |
150 | .Pp | ||
151 | Although | ||
152 | .Fn CMS_get0_SignerInfos | ||
153 | can return | ||
154 | .Dv NULL | ||
155 | if an error occurs | ||
156 | .Em or | ||
157 | if there are no signers, this is not a problem in practice because the | ||
158 | only error which can occur is if the | ||
159 | .Fa cms | ||
160 | structure is not of type signedData due to application error. | ||
161 | .Sh RETURN VALUES | 149 | .Sh RETURN VALUES |
162 | .Fn CMS_get0_SignerInfos | 150 | .Fn CMS_get0_SignerInfos |
163 | returns all | 151 | returns an internal pointer to all the |
164 | .Vt CMS_SignerInfo | 152 | .Vt CMS_SignerInfo |
165 | structures, or | 153 | structures, or |
166 | .Dv NULL | 154 | .Dv NULL |
167 | if there are no signers or an error occurs. | 155 | if there are no signers or if |
156 | .Fa cms | ||
157 | is not of the type | ||
158 | .Vt SignedData . | ||
168 | .Pp | 159 | .Pp |
169 | .Fn CMS_SignerInfo_get0_signer_id | 160 | .Fn CMS_SignerInfo_get0_signer_id |
170 | returns 1 for success or 0 for failure. | 161 | returns 1 for success or 0 for failure. |
171 | .Pp | 162 | .Pp |
163 | .Fn CMS_SignerInfo_get0_signature | ||
164 | returns an internal pointer to the signature. | ||
165 | .Pp | ||
172 | .Fn CMS_SignerInfo_cert_cmp | 166 | .Fn CMS_SignerInfo_cert_cmp |
173 | returns 0 for a successful comparison or non-zero otherwise. | 167 | returns 0 for a match or non-zero otherwise. |
174 | .Pp | 168 | .Pp |
175 | Any error can be obtained from | 169 | Any error can be obtained from |
176 | .Xr ERR_get_error 3 . | 170 | .Xr ERR_get_error 3 . |
177 | .Sh SEE ALSO | 171 | .Sh SEE ALSO |
178 | .Xr CMS_verify 3 | 172 | .Xr CMS_verify 3 |
173 | .Sh STANDARDS | ||
174 | RFC 5652: Cryptographic Message Syntax (CMS) | ||
175 | .Bl -dash -compact -offset indent | ||
176 | .It | ||
177 | section 5.1: SignedData Type | ||
178 | .It | ||
179 | section 5.3: SignerInfo Type | ||
180 | .El | ||
179 | .Sh HISTORY | 181 | .Sh HISTORY |
180 | .Fn CMS_get0_SignerInfos , | 182 | .Fn CMS_get0_SignerInfos , |
181 | .Fn CMS_SignerInfo_get0_signer_id , | 183 | .Fn CMS_SignerInfo_get0_signer_id , |