summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2023-08-27 13:08:15 +0000
committerschwarze <>2023-08-27 13:08:15 +0000
commit939d9d0329a0fed79dd46937e1592c4839a8f778 (patch)
treeafeb67424c6476ef47c449ba0671a6a1f0cdf73c /src/lib
parent68e3cb43b8d0d5c51af229d94863e643e9889efa (diff)
downloadopenbsd-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.353
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
362can be passed. 369can be passed.
363.Pp 370.Pp
371.Fn EVP_PKEY_set_type_str
372frees the key referenced in
373.Fa pkey ,
374if any, and sets the key type of
375.Fa pkey
376according to the PEM type string given by the first
377.Fa len
378bytes of
379.Fa str .
380If
381.Fa len
382is \-1, the
383.Xr strlen 3
384of
385.Fa str
386is used instead.
387The PEM type strings supported by default are listed in the table above.
388This function does not reference a new key from
389.Fa pkey .
390.Pp
391If
392.Fa pkey
393is a
394.Dv NULL
395pointer,
396.Fn EVP_PKEY_set_type
397and
398.Fn EVP_PKEY_set_type_str
399check that a matching key type exists but do not change any object.
400.Pp
364In accordance with the OpenSSL naming convention, the key obtained from 401In accordance with the OpenSSL naming convention, the key obtained from
365or assigned to 402or 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 ,
382and 420and
383.Fn EVP_PKEY_set_type 421.Fn EVP_PKEY_set_type_str
384return 1 for success or 0 for failure. 422return 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 ,
459and 498and
460.Fn EVP_PKEY_id 499.Fn EVP_PKEY_set_type_str
461first appeared in OpenSSL 1.0.0 and have been available since 500first appeared in OpenSSL 1.0.0 and have been available since
462.Ox 4.9 . 501.Ox 4.9 .
463.Pp 502.Pp