diff options
author | schwarze <> | 2020-06-24 19:55:55 +0000 |
---|---|---|
committer | schwarze <> | 2020-06-24 19:55:55 +0000 |
commit | 4dec832179bf3d0537e7251363a28b4f02692426 (patch) | |
tree | 18528ad5c6f0effef90a88941bb48bdb83932984 | |
parent | 7cf633fcec3c8fa2f0cf16458c93b1b4f7cd4b2c (diff) | |
download | openbsd-4dec832179bf3d0537e7251363a28b4f02692426.tar.gz openbsd-4dec832179bf3d0537e7251363a28b4f02692426.tar.bz2 openbsd-4dec832179bf3d0537e7251363a28b4f02692426.zip |
Properly document the return values of EVP_PKEY_base_id(3)
and EVP_PKEY_id(3), then describe the "type" parameters of
various functions more precisely referencing that information.
In particular, document X509_get_signature_type(3) which was
so far missing.
OK tb@
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_CTX_new.3 | 27 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 | 49 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 | 102 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_get0_signature.3 | 44 |
4 files changed, 152 insertions, 70 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_CTX_new.3 b/src/lib/libcrypto/man/EVP_PKEY_CTX_new.3 index befe1bd92f..8f6a0a6513 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_CTX_new.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_CTX_new.3 | |||
@@ -1,10 +1,10 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_CTX_new.3,v 1.10 2019/11/01 19:51:09 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_CTX_new.3,v 1.11 2020/06/24 19:55:55 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | 2 | .\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file is a derived work. | 4 | .\" This file is a derived work. |
5 | .\" The changes are covered by the following Copyright and license: | 5 | .\" The changes are covered by the following Copyright and license: |
6 | .\" | 6 | .\" |
7 | .\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org> | 7 | .\" Copyright (c) 2019, 2020 Ingo Schwarze <schwarze@openbsd.org> |
8 | .\" | 8 | .\" |
9 | .\" Permission to use, copy, modify, and distribute this software for any | 9 | .\" Permission to use, copy, modify, and distribute this software for any |
10 | .\" purpose with or without fee is hereby granted, provided that the above | 10 | .\" purpose with or without fee is hereby granted, provided that the above |
@@ -65,7 +65,7 @@ | |||
65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
67 | .\" | 67 | .\" |
68 | .Dd $Mdocdate: November 1 2019 $ | 68 | .Dd $Mdocdate: June 24 2020 $ |
69 | .Dt EVP_PKEY_CTX_NEW 3 | 69 | .Dt EVP_PKEY_CTX_NEW 3 |
70 | .Os | 70 | .Os |
71 | .Sh NAME | 71 | .Sh NAME |
@@ -123,23 +123,13 @@ It is normally used when no | |||
123 | .Vt EVP_PKEY | 123 | .Vt EVP_PKEY |
124 | structure is associated with the operations, for example during | 124 | structure is associated with the operations, for example during |
125 | parameter generation of key generation for some algorithms. | 125 | parameter generation of key generation for some algorithms. |
126 | The following | 126 | The |
127 | .Fa id | 127 | .Fa id |
128 | constants are supported: | 128 | argument can be any of the constants that |
129 | .Dv EVP_PKEY_CMAC , | 129 | .Xr EVP_PKEY_base_id 3 |
130 | .Dv EVP_PKEY_DH , | ||
131 | .Dv EVP_PKEY_DSA , | ||
132 | .Dv EVP_PKEY_EC , | ||
133 | .Dv EVP_PKEY_GOSTIMIT , | ||
134 | .Dv EVP_PKEY_GOSTR01 , | ||
135 | .Dv EVP_PKEY_HMAC , | ||
136 | .Dv EVP_PKEY_RSA , | ||
137 | and | 130 | and |
138 | .Dv EVP_PKEY_RSA_PSS . | 131 | .Xr EVP_PKEY_id 3 |
139 | Application programs can define additional | 132 | may return. |
140 | .Fa id | ||
141 | values using | ||
142 | .Xr EVP_PKEY_meth_new 3 . | ||
143 | .Pp | 133 | .Pp |
144 | .Fn EVP_PKEY_CTX_dup | 134 | .Fn EVP_PKEY_CTX_dup |
145 | duplicates the context | 135 | duplicates the context |
@@ -166,6 +156,7 @@ if an error occurred. | |||
166 | .Sh SEE ALSO | 156 | .Sh SEE ALSO |
167 | .Xr EVP_DigestSignInit 3 , | 157 | .Xr EVP_DigestSignInit 3 , |
168 | .Xr EVP_DigestVerifyInit 3 , | 158 | .Xr EVP_DigestVerifyInit 3 , |
159 | .Xr EVP_PKEY_base_id 3 , | ||
169 | .Xr EVP_PKEY_CTX_ctrl 3 , | 160 | .Xr EVP_PKEY_CTX_ctrl 3 , |
170 | .Xr EVP_PKEY_decrypt 3 , | 161 | .Xr EVP_PKEY_decrypt 3 , |
171 | .Xr EVP_PKEY_derive 3 , | 162 | .Xr EVP_PKEY_derive 3 , |
diff --git a/src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 b/src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 index 11692ffd43..c14420ba5d 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 | |||
@@ -1,7 +1,24 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_asn1_get_count.3,v 1.4 2019/06/06 01:06:58 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_asn1_get_count.3,v 1.5 2020/06/24 19:55:54 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL 751148e2 Oct 27 00:11:11 2017 +0200 | 2 | .\" full merge up to: OpenSSL 72a7a702 Feb 26 14:05:09 2019 +0000 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Richard Levitte <levitte@openssl.org>. | 4 | .\" This file is a derived work. |
5 | .\" The changes are covered by the following Copyright and license: | ||
6 | .\" | ||
7 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | ||
8 | .\" | ||
9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
11 | .\" copyright notice and this permission notice appear in all copies. | ||
12 | .\" | ||
13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
20 | .\" | ||
21 | .\" The original file was written by Richard Levitte <levitte@openssl.org>. | ||
5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | 22 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. |
6 | .\" | 23 | .\" |
7 | .\" Redistribution and use in source and binary forms, with or without | 24 | .\" Redistribution and use in source and binary forms, with or without |
@@ -48,7 +65,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 67 | .\" |
51 | .Dd $Mdocdate: June 6 2019 $ | 68 | .Dd $Mdocdate: June 24 2020 $ |
52 | .Dt EVP_PKEY_ASN1_GET_COUNT 3 | 69 | .Dt EVP_PKEY_ASN1_GET_COUNT 3 |
53 | .Os | 70 | .Os |
54 | .Sh NAME | 71 | .Sh NAME |
@@ -93,7 +110,7 @@ | |||
93 | .Fc | 110 | .Fc |
94 | .Sh DESCRIPTION | 111 | .Sh DESCRIPTION |
95 | .Fn EVP_PKEY_asn1_get_count | 112 | .Fn EVP_PKEY_asn1_get_count |
96 | returns a count of the number of public key ASN.1 methods available. | 113 | returns the number of public key ASN.1 methods available. |
97 | It includes standard methods and any methods added by the application. | 114 | It includes standard methods and any methods added by the application. |
98 | .Pp | 115 | .Pp |
99 | .Fn EVP_PKEY_asn1_get0 | 116 | .Fn EVP_PKEY_asn1_get0 |
@@ -107,7 +124,12 @@ must be in the range from zero to | |||
107 | .Pp | 124 | .Pp |
108 | .Fn EVP_PKEY_asn1_find | 125 | .Fn EVP_PKEY_asn1_find |
109 | looks up the method with NID | 126 | looks up the method with NID |
110 | .Fa type . | 127 | .Fa type , |
128 | which can be any of the values that | ||
129 | .Xr EVP_PKEY_base_id 3 | ||
130 | and | ||
131 | .Xr EVP_PKEY_id 3 | ||
132 | may return. | ||
111 | If | 133 | If |
112 | .Fa pe | 134 | .Fa pe |
113 | is not | 135 | is not |
@@ -121,6 +143,9 @@ is set to that engine and the method from that engine is returned instead. | |||
121 | .Fn EVP_PKEY_asn1_find_str | 143 | .Fn EVP_PKEY_asn1_find_str |
122 | looks up the method with PEM type string | 144 | looks up the method with PEM type string |
123 | .Fa str . | 145 | .Fa str . |
146 | The PEM type strings supported by default are listed in the | ||
147 | .Xr EVP_PKEY_base_id 3 | ||
148 | manual page. | ||
124 | Just like | 149 | Just like |
125 | .Fn EVP_PKEY_asn1_find , | 150 | .Fn EVP_PKEY_asn1_find , |
126 | if | 151 | if |
@@ -130,10 +155,14 @@ is not | |||
130 | methods from engines are preferred. | 155 | methods from engines are preferred. |
131 | .Pp | 156 | .Pp |
132 | .Fn EVP_PKEY_asn1_get0_info | 157 | .Fn EVP_PKEY_asn1_get0_info |
133 | retrieves the public key ID, the base public key ID (both NIDs), any flags, | 158 | retrieves the public key ID as returned by |
134 | the method description and the PEM type string associated with the public | 159 | .Xr EVP_PKEY_id 3 , |
135 | key ASN.1 method | 160 | the base public key ID as returned by |
136 | .Sy *ameth . | 161 | .Xr EVP_PKEY_base_id 3 |
162 | .Pq both NIDs , | ||
163 | any flags, the method description, | ||
164 | and the PEM type string associated with | ||
165 | .Fa ameth . | ||
137 | .Pp | 166 | .Pp |
138 | .Fn EVP_PKEY_asn1_get_count , | 167 | .Fn EVP_PKEY_asn1_get_count , |
139 | .Fn EVP_PKEY_asn1_get0 , | 168 | .Fn EVP_PKEY_asn1_get0 , |
diff --git a/src/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 b/src/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 index 9851538c41..99faf8dabb 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 | |||
@@ -1,10 +1,10 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.16 2019/09/01 09:10:09 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.17 2020/06/24 19:55:54 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 |
3 | .\" | 3 | .\" |
4 | .\" This file is a derived work. | 4 | .\" This file is a derived work. |
5 | .\" The changes are covered by the following Copyright and license: | 5 | .\" The changes are covered by the following Copyright and license: |
6 | .\" | 6 | .\" |
7 | .\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org> | 7 | .\" Copyright (c) 2019, 2020 Ingo Schwarze <schwarze@openbsd.org> |
8 | .\" | 8 | .\" |
9 | .\" Permission to use, copy, modify, and distribute this software for any | 9 | .\" Permission to use, copy, modify, and distribute this software for any |
10 | .\" purpose with or without fee is hereby granted, provided that the above | 10 | .\" purpose with or without fee is hereby granted, provided that the above |
@@ -65,7 +65,7 @@ | |||
65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
67 | .\" | 67 | .\" |
68 | .Dd $Mdocdate: September 1 2019 $ | 68 | .Dd $Mdocdate: June 24 2020 $ |
69 | .Dt EVP_PKEY_SET1_RSA 3 | 69 | .Dt EVP_PKEY_SET1_RSA 3 |
70 | .Os | 70 | .Os |
71 | .Sh NAME | 71 | .Sh NAME |
@@ -89,10 +89,10 @@ | |||
89 | .Nm EVP_PKEY_assign_EC_KEY , | 89 | .Nm EVP_PKEY_assign_EC_KEY , |
90 | .Nm EVP_PKEY_assign_GOST , | 90 | .Nm EVP_PKEY_assign_GOST , |
91 | .Nm EVP_PKEY_assign , | 91 | .Nm EVP_PKEY_assign , |
92 | .Nm EVP_PKEY_set_type , | ||
93 | .Nm EVP_PKEY_base_id , | 92 | .Nm EVP_PKEY_base_id , |
94 | .Nm EVP_PKEY_id , | 93 | .Nm EVP_PKEY_id , |
95 | .Nm EVP_PKEY_type | 94 | .Nm EVP_PKEY_type , |
95 | .Nm EVP_PKEY_set_type | ||
96 | .Nd EVP_PKEY assignment functions | 96 | .Nd EVP_PKEY assignment functions |
97 | .Sh SYNOPSIS | 97 | .Sh SYNOPSIS |
98 | .In openssl/evp.h | 98 | .In openssl/evp.h |
@@ -189,11 +189,6 @@ | |||
189 | .Fa "void *key" | 189 | .Fa "void *key" |
190 | .Fc | 190 | .Fc |
191 | .Ft int | 191 | .Ft int |
192 | .Fo EVP_PKEY_set_type | ||
193 | .Fa "EVP_PKEY *pkey" | ||
194 | .Fa "int type" | ||
195 | .Fc | ||
196 | .Ft int | ||
197 | .Fo EVP_PKEY_base_id | 192 | .Fo EVP_PKEY_base_id |
198 | .Fa "EVP_PKEY *pkey" | 193 | .Fa "EVP_PKEY *pkey" |
199 | .Fc | 194 | .Fc |
@@ -205,6 +200,11 @@ | |||
205 | .Fo EVP_PKEY_type | 200 | .Fo EVP_PKEY_type |
206 | .Fa "int type" | 201 | .Fa "int type" |
207 | .Fc | 202 | .Fc |
203 | .Ft int | ||
204 | .Fo EVP_PKEY_set_type | ||
205 | .Fa "EVP_PKEY *pkey" | ||
206 | .Fa "int type" | ||
207 | .Fc | ||
208 | .Sh DESCRIPTION | 208 | .Sh DESCRIPTION |
209 | .Fn EVP_PKEY_set1_RSA , | 209 | .Fn EVP_PKEY_set1_RSA , |
210 | .Fn EVP_PKEY_set1_DSA , | 210 | .Fn EVP_PKEY_set1_DSA , |
@@ -286,38 +286,51 @@ The following types are supported: | |||
286 | and | 286 | and |
287 | .Dv EVP_PKEY_GOSTR01 . | 287 | .Dv EVP_PKEY_GOSTR01 . |
288 | .Pp | 288 | .Pp |
289 | .Fn EVP_PKEY_set_type | ||
290 | frees the key referenced in | ||
291 | .Fa pkey , | ||
292 | if any, and sets the key type of | ||
293 | .Fa pkey | ||
294 | to | ||
295 | .Fa type | ||
296 | without referencing a new key from | ||
297 | .Fa pkey | ||
298 | yet. | ||
299 | .Pp | ||
300 | .Fn EVP_PKEY_base_id | 289 | .Fn EVP_PKEY_base_id |
301 | returns the type of | 290 | returns the type of |
302 | .Fa pkey . | 291 | .Fa pkey |
303 | For example, an RSA key will return | 292 | according to the following table: |
304 | .Dv EVP_PKEY_RSA . | 293 | .Pp |
294 | .Bl -column -compact -offset 2n EVP_PKEY_GOSTR NID_X9_62_id_ecPublicKey | ||
295 | .It Sy return value Ta Ta Sy PEM type string | ||
296 | .It Dv EVP_PKEY_CMAC Ta = Dv NID_cmac Ta CMAC | ||
297 | .It Dv EVP_PKEY_DH Ta = Dv NID_dhKeyAgreement Ta DH | ||
298 | .It Dv EVP_PKEY_DSA Ta = Dv NID_dsa Ta DSA | ||
299 | .It Dv EVP_PKEY_EC Ta = Dv NID_X9_62_id_ecPublicKey Ta EC | ||
300 | .It Dv EVP_PKEY_GOSTIMIT Ta = Dv NID_id_Gost28147_89_MAC Ta GOST-MAC | ||
301 | .It Dv EVP_PKEY_GOSTR01 Ta = Dv NID_id_GostR3410_2001 Ta GOST2001 | ||
302 | .It Dv EVP_PKEY_HMAC Ta = Dv NID_hmac Ta HMAC | ||
303 | .It Dv EVP_PKEY_RSA Ta = Dv NID_rsaEncryption Ta RSA | ||
304 | .It Dv EVP_PKEY_RSA_PSS Ta = Dv NID_rsassaPss Ta RSA-PSS | ||
305 | .El | ||
306 | .Pp | ||
307 | Application programs can support additional key types by calling | ||
308 | .Xr EVP_PKEY_asn1_add0 3 . | ||
305 | .Pp | 309 | .Pp |
306 | .Fn EVP_PKEY_id | 310 | .Fn EVP_PKEY_id |
307 | returns the actual OID associated with | 311 | returns the actual OID associated with |
308 | .Fa pkey . | 312 | .Fa pkey . |
309 | Historically keys using the same algorithm could use different OIDs. | 313 | Historically keys using the same algorithm could use different OIDs. |
310 | For example, an RSA key could use the OIDs corresponding to the NIDs | 314 | The following deprecated aliases are still supported: |
311 | .Dv NID_rsaEncryption | 315 | .Pp |
312 | (equivalent to | 316 | .Bl -column -compact -offset 2n EVP_PKEY_GOSTR12_ NID_id_tc26_gost3410_2012_512 |
313 | .Dv EVP_PKEY_RSA ) | 317 | .It Sy return value Ta Ta Sy alias for |
314 | or | 318 | .It Dv EVP_PKEY_DSA1 Ta = Dv NID_dsa_2 Ta DSA |
315 | .Dv NID_rsa | 319 | .It Dv EVP_PKEY_DSA2 Ta = Dv NID_dsaWithSHA Ta DSA |
316 | (equivalent to | 320 | .It Dv EVP_PKEY_DSA3 Ta = Dv NID_dsaWithSHA1 Ta DSA |
317 | .Dv EVP_PKEY_RSA2 ) . | 321 | .It Dv EVP_PKEY_DSA4 Ta = Dv NID_dsaWithSHA1_2 Ta DSA |
318 | The use of alternative non-standard OIDs is now rare, so | 322 | .It Dv EVP_PKEY_GOSTR12_256 Ta = Dv NID_id_tc26_gost3410_2012_256 Ta GOST2001 |
319 | .Dv EVP_PKEY_RSA2 | 323 | .It Dv EVP_PKEY_GOSTR12_512 Ta = Dv NID_id_tc26_gost3410_2012_512 Ta GOST2001 |
320 | et al. are not often seen in practice. | 324 | .It Dv EVP_PKEY_RSA2 Ta = Dv NID_rsa Ta RSA |
325 | .El | ||
326 | .Pp | ||
327 | Application programs can support additional alternative OIDs by calling | ||
328 | .Xr EVP_PKEY_asn1_add_alias 3 . | ||
329 | .Pp | ||
330 | Most applications wishing to know a key type will simply call | ||
331 | .Fn EVP_PKEY_base_id | ||
332 | and will not care about the actual type, | ||
333 | which will be identical in almost all cases. | ||
321 | .Pp | 334 | .Pp |
322 | .Fn EVP_PKEY_type | 335 | .Fn EVP_PKEY_type |
323 | returns the underlying type of the NID | 336 | returns the underlying type of the NID |
@@ -327,10 +340,23 @@ For example, | |||
327 | will return | 340 | will return |
328 | .Dv EVP_PKEY_RSA . | 341 | .Dv EVP_PKEY_RSA . |
329 | .Pp | 342 | .Pp |
330 | Most applications wishing to know a key type will simply call | 343 | .Fn EVP_PKEY_set_type |
344 | frees the key referenced in | ||
345 | .Fa pkey , | ||
346 | if any, and sets the key type of | ||
347 | .Fa pkey | ||
348 | to | ||
349 | .Fa type | ||
350 | without referencing a new key from | ||
351 | .Fa pkey | ||
352 | yet. | ||
353 | For | ||
354 | .Fa type , | ||
355 | any of the possible return values of | ||
331 | .Fn EVP_PKEY_base_id | 356 | .Fn EVP_PKEY_base_id |
332 | and will not care about the actual type, | 357 | and |
333 | which will be identical in almost all cases. | 358 | .Fn EVP_PKEY_id |
359 | can be passed. | ||
334 | .Pp | 360 | .Pp |
335 | In accordance with the OpenSSL naming convention, the key obtained from | 361 | In accordance with the OpenSSL naming convention, the key obtained from |
336 | or assigned to | 362 | or assigned to |
diff --git a/src/lib/libcrypto/man/X509_get0_signature.3 b/src/lib/libcrypto/man/X509_get0_signature.3 index a0982f2193..903cc043d9 100644 --- a/src/lib/libcrypto/man/X509_get0_signature.3 +++ b/src/lib/libcrypto/man/X509_get0_signature.3 | |||
@@ -1,8 +1,25 @@ | |||
1 | .\" $OpenBSD: X509_get0_signature.3,v 1.5 2018/03/23 23:18:17 schwarze Exp $ | 1 | .\" $OpenBSD: X509_get0_signature.3,v 1.6 2020/06/24 19:55:55 schwarze Exp $ |
2 | .\" selective merge up to: | 2 | .\" selective merge up to: |
3 | .\" OpenSSL man3/X509_get0_signature 2f7a2520 Apr 25 17:28:08 2017 +0100 | 3 | .\" OpenSSL man3/X509_get0_signature 2f7a2520 Apr 25 17:28:08 2017 +0100 |
4 | .\" | 4 | .\" |
5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 5 | .\" This file is a derived work. |
6 | .\" The changes are covered by the following Copyright and license: | ||
7 | .\" | ||
8 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | ||
9 | .\" | ||
10 | .\" Permission to use, copy, modify, and distribute this software for any | ||
11 | .\" purpose with or without fee is hereby granted, provided that the above | ||
12 | .\" copyright notice and this permission notice appear in all copies. | ||
13 | .\" | ||
14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
15 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
16 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
17 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
18 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
19 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
20 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
21 | .\" | ||
22 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
6 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. | 23 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. |
7 | .\" | 24 | .\" |
8 | .\" Redistribution and use in source and binary forms, with or without | 25 | .\" Redistribution and use in source and binary forms, with or without |
@@ -49,7 +66,7 @@ | |||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
51 | .\" | 68 | .\" |
52 | .Dd $Mdocdate: March 23 2018 $ | 69 | .Dd $Mdocdate: June 24 2020 $ |
53 | .Dt X509_GET0_SIGNATURE 3 | 70 | .Dt X509_GET0_SIGNATURE 3 |
54 | .Os | 71 | .Os |
55 | .Sh NAME | 72 | .Sh NAME |
@@ -57,6 +74,7 @@ | |||
57 | .Nm X509_REQ_get0_signature , | 74 | .Nm X509_REQ_get0_signature , |
58 | .Nm X509_CRL_get0_signature , | 75 | .Nm X509_CRL_get0_signature , |
59 | .Nm X509_get0_tbs_sigalg , | 76 | .Nm X509_get0_tbs_sigalg , |
77 | .Nm X509_get_signature_type , | ||
60 | .Nm X509_get_signature_nid , | 78 | .Nm X509_get_signature_nid , |
61 | .Nm X509_REQ_get_signature_nid , | 79 | .Nm X509_REQ_get_signature_nid , |
62 | .Nm X509_CRL_get_signature_nid | 80 | .Nm X509_CRL_get_signature_nid |
@@ -86,6 +104,10 @@ | |||
86 | .Fa "const X509 *x" | 104 | .Fa "const X509 *x" |
87 | .Fc | 105 | .Fc |
88 | .Ft int | 106 | .Ft int |
107 | .Fo X509_get_signature_type | ||
108 | .Fa "const X509 *x" | ||
109 | .Fc | ||
110 | .Ft int | ||
89 | .Fo X509_get_signature_nid | 111 | .Fo X509_get_signature_nid |
90 | .Fa "const X509 *x" | 112 | .Fa "const X509 *x" |
91 | .Fc | 113 | .Fc |
@@ -118,6 +140,13 @@ returns the signature algorithm in the signed portion of | |||
118 | The values returned are internal pointers | 140 | The values returned are internal pointers |
119 | that must not be freed by the caller. | 141 | that must not be freed by the caller. |
120 | .Pp | 142 | .Pp |
143 | .Fn X509_get_signature_type | ||
144 | returns the base NID corresponding to the signature algorithm of | ||
145 | .Fa x | ||
146 | just like | ||
147 | .Xr EVP_PKEY_base_id 3 | ||
148 | does. | ||
149 | .Pp | ||
121 | .Fn X509_get_signature_nid , | 150 | .Fn X509_get_signature_nid , |
122 | .Fn X509_REQ_get_signature_nid , | 151 | .Fn X509_REQ_get_signature_nid , |
123 | and | 152 | and |
@@ -127,7 +156,9 @@ return the NID corresponding to the signature algorithm of | |||
127 | .Fa req , | 156 | .Fa req , |
128 | or | 157 | or |
129 | .Fa crl , | 158 | .Fa crl , |
130 | respectively. | 159 | respectively, just like |
160 | .Xr EVP_PKEY_id 3 | ||
161 | does. | ||
131 | .Pp | 162 | .Pp |
132 | These functions provide lower level access to the signature | 163 | These functions provide lower level access to the signature |
133 | for cases where an application wishes to analyse or generate a | 164 | for cases where an application wishes to analyse or generate a |
@@ -135,6 +166,7 @@ signature in a form where | |||
135 | .Xr X509_sign 3 | 166 | .Xr X509_sign 3 |
136 | is not appropriate, for example in a non-standard or unsupported format. | 167 | is not appropriate, for example in a non-standard or unsupported format. |
137 | .Sh SEE ALSO | 168 | .Sh SEE ALSO |
169 | .Xr EVP_PKEY_base_id 3 , | ||
138 | .Xr OBJ_obj2nid 3 , | 170 | .Xr OBJ_obj2nid 3 , |
139 | .Xr X509_ALGOR_new 3 , | 171 | .Xr X509_ALGOR_new 3 , |
140 | .Xr X509_CRL_get0_by_serial 3 , | 172 | .Xr X509_CRL_get0_by_serial 3 , |
@@ -147,6 +179,10 @@ is not appropriate, for example in a non-standard or unsupported format. | |||
147 | .Xr X509_sign 3 , | 179 | .Xr X509_sign 3 , |
148 | .Xr X509_verify_cert 3 | 180 | .Xr X509_verify_cert 3 |
149 | .Sh HISTORY | 181 | .Sh HISTORY |
182 | .Fn X509_get_signature_type | ||
183 | first appeared in SSLeay 0.8.0 and has been available since | ||
184 | .Ox 2.4 . | ||
185 | .Pp | ||
150 | .Fn X509_get0_signature | 186 | .Fn X509_get0_signature |
151 | and | 187 | and |
152 | .Fn X509_get_signature_nid | 188 | .Fn X509_get_signature_nid |