diff options
author | schwarze <> | 2023-08-27 13:08:15 +0000 |
---|---|---|
committer | schwarze <> | 2023-08-27 13:08:15 +0000 |
commit | 939d9d0329a0fed79dd46937e1592c4839a8f778 (patch) | |
tree | afeb67424c6476ef47c449ba0671a6a1f0cdf73c /src/lib | |
parent | 68e3cb43b8d0d5c51af229d94863e643e9889efa (diff) | |
download | openbsd-939d9d0329a0fed79dd46937e1592c4839a8f778.tar.gz openbsd-939d9d0329a0fed79dd46937e1592c4839a8f778.tar.bz2 openbsd-939d9d0329a0fed79dd46937e1592c4839a8f778.zip |
document EVP_PKEY_set_type_str(3)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 | 53 |
1 files changed, 46 insertions, 7 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 b/src/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 index cf2786d6eb..4a382e1150 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.19 2022/09/11 04:39:46 jsg Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.20 2023/08/27 13:08:15 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, 2020 Ingo Schwarze <schwarze@openbsd.org> | 7 | .\" Copyright (c) 2019, 2020, 2023 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 11 2022 $ | 68 | .Dd $Mdocdate: August 27 2023 $ |
69 | .Dt EVP_PKEY_SET1_RSA 3 | 69 | .Dt EVP_PKEY_SET1_RSA 3 |
70 | .Os | 70 | .Os |
71 | .Sh NAME | 71 | .Sh NAME |
@@ -92,7 +92,8 @@ | |||
92 | .Nm EVP_PKEY_base_id , | 92 | .Nm EVP_PKEY_base_id , |
93 | .Nm EVP_PKEY_id , | 93 | .Nm EVP_PKEY_id , |
94 | .Nm EVP_PKEY_type , | 94 | .Nm EVP_PKEY_type , |
95 | .Nm EVP_PKEY_set_type | 95 | .Nm EVP_PKEY_set_type , |
96 | .Nm EVP_PKEY_set_type_str | ||
96 | .\" The function X509_certificate_type(3) is intentionally undocumented | 97 | .\" The function X509_certificate_type(3) is intentionally undocumented |
97 | .\" and scheduled for deletion from the library. BoringSSL already | 98 | .\" and scheduled for deletion from the library. BoringSSL already |
98 | .\" deleted it and OpenSSL deprecates it in version 3.0. | 99 | .\" deleted it and OpenSSL deprecates it in version 3.0. |
@@ -208,6 +209,12 @@ | |||
208 | .Fa "EVP_PKEY *pkey" | 209 | .Fa "EVP_PKEY *pkey" |
209 | .Fa "int type" | 210 | .Fa "int type" |
210 | .Fc | 211 | .Fc |
212 | .Ft int | ||
213 | .Fo EVP_PKEY_set_type_str | ||
214 | .Fa "EVP_PKEY *pkey" | ||
215 | .Fa "const char *str" | ||
216 | .Fa "int len" | ||
217 | .Fc | ||
211 | .Sh DESCRIPTION | 218 | .Sh DESCRIPTION |
212 | .Fn EVP_PKEY_set1_RSA , | 219 | .Fn EVP_PKEY_set1_RSA , |
213 | .Fn EVP_PKEY_set1_DSA , | 220 | .Fn EVP_PKEY_set1_DSA , |
@@ -361,6 +368,36 @@ and | |||
361 | .Fn EVP_PKEY_id | 368 | .Fn EVP_PKEY_id |
362 | can be passed. | 369 | can be passed. |
363 | .Pp | 370 | .Pp |
371 | .Fn EVP_PKEY_set_type_str | ||
372 | frees the key referenced in | ||
373 | .Fa pkey , | ||
374 | if any, and sets the key type of | ||
375 | .Fa pkey | ||
376 | according to the PEM type string given by the first | ||
377 | .Fa len | ||
378 | bytes of | ||
379 | .Fa str . | ||
380 | If | ||
381 | .Fa len | ||
382 | is \-1, the | ||
383 | .Xr strlen 3 | ||
384 | of | ||
385 | .Fa str | ||
386 | is used instead. | ||
387 | The PEM type strings supported by default are listed in the table above. | ||
388 | This function does not reference a new key from | ||
389 | .Fa pkey . | ||
390 | .Pp | ||
391 | If | ||
392 | .Fa pkey | ||
393 | is a | ||
394 | .Dv NULL | ||
395 | pointer, | ||
396 | .Fn EVP_PKEY_set_type | ||
397 | and | ||
398 | .Fn EVP_PKEY_set_type_str | ||
399 | check that a matching key type exists but do not change any object. | ||
400 | .Pp | ||
364 | In accordance with the OpenSSL naming convention, the key obtained from | 401 | In accordance with the OpenSSL naming convention, the key obtained from |
365 | or assigned to | 402 | or assigned to |
366 | .Fa pkey | 403 | .Fa pkey |
@@ -379,8 +416,9 @@ functions must be freed as well as | |||
379 | .Fn EVP_PKEY_assign_EC_KEY , | 416 | .Fn EVP_PKEY_assign_EC_KEY , |
380 | .Fn EVP_PKEY_assign_GOST , | 417 | .Fn EVP_PKEY_assign_GOST , |
381 | .Fn EVP_PKEY_assign , | 418 | .Fn EVP_PKEY_assign , |
419 | .Fn EVP_PKEY_set_type , | ||
382 | and | 420 | and |
383 | .Fn EVP_PKEY_set_type | 421 | .Fn EVP_PKEY_set_type_str |
384 | return 1 for success or 0 for failure. | 422 | return 1 for success or 0 for failure. |
385 | .Pp | 423 | .Pp |
386 | .Fn EVP_PKEY_get1_RSA , | 424 | .Fn EVP_PKEY_get1_RSA , |
@@ -454,10 +492,11 @@ first appeared in OpenSSL 0.9.8 and have been available since | |||
454 | .Ox 4.5 . | 492 | .Ox 4.5 . |
455 | .Pp | 493 | .Pp |
456 | .Fn EVP_PKEY_get0 , | 494 | .Fn EVP_PKEY_get0 , |
457 | .Fn EVP_PKEY_set_type , | ||
458 | .Fn EVP_PKEY_base_id , | 495 | .Fn EVP_PKEY_base_id , |
496 | .Fn EVP_PKEY_id , | ||
497 | .Fn EVP_PKEY_set_type , | ||
459 | and | 498 | and |
460 | .Fn EVP_PKEY_id | 499 | .Fn EVP_PKEY_set_type_str |
461 | first appeared in OpenSSL 1.0.0 and have been available since | 500 | first appeared in OpenSSL 1.0.0 and have been available since |
462 | .Ox 4.9 . | 501 | .Ox 4.9 . |
463 | .Pp | 502 | .Pp |