diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_check.3')
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_check.3 | 149 |
1 files changed, 0 insertions, 149 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_check.3 b/src/lib/libcrypto/man/EVP_PKEY_check.3 deleted file mode 100644 index 5a78e3512e..0000000000 --- a/src/lib/libcrypto/man/EVP_PKEY_check.3 +++ /dev/null | |||
@@ -1,149 +0,0 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_check.3,v 1.2 2022/07/14 14:49:09 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2022 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: July 14 2022 $ | ||
18 | .Dt EVP_PKEY_CHECK 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm EVP_PKEY_check , | ||
22 | .Nm EVP_PKEY_public_check , | ||
23 | .Nm EVP_PKEY_param_check | ||
24 | .Nd key and parameter check functions | ||
25 | .Sh SYNOPSIS | ||
26 | .In openssl/evp.h | ||
27 | .Ft int | ||
28 | .Fn EVP_PKEY_check "EVP_PKEY_CTX *ctx" | ||
29 | .Ft int | ||
30 | .Fn EVP_PKEY_public_check "EVP_PKEY_CTX *ctx" | ||
31 | .Ft int | ||
32 | .Fn EVP_PKEY_param_check "EVP_PKEY_CTX *ctx" | ||
33 | .Sh DESCRIPTION | ||
34 | .Fn EVP_PKEY_check | ||
35 | performs various sanity checks on the key contained in | ||
36 | .Fa ctx | ||
37 | but only supports a small number of key types by default. | ||
38 | It preferably uses the function | ||
39 | .Fa check | ||
40 | configured for | ||
41 | .Fa ctx | ||
42 | with | ||
43 | .Xr EVP_PKEY_meth_set_check 3 . | ||
44 | It falls back to the function | ||
45 | .Fa pkey_check | ||
46 | configured for the private key contained in | ||
47 | .Fa ctx | ||
48 | with | ||
49 | .Xr EVP_PKEY_asn1_set_check 3 . | ||
50 | If that wasn't configured either, it attempts to use the following | ||
51 | check functions: | ||
52 | .Pp | ||
53 | .Bl -tag -width 3n -compact -offset -indent | ||
54 | .It DH | ||
55 | not supported, return value \-2 | ||
56 | .It EC | ||
57 | .Xr EC_KEY_check_key 3 | ||
58 | .It RSA | ||
59 | .Xr RSA_check_key 3 | ||
60 | .El | ||
61 | .Pp | ||
62 | .Fn EVP_PKEY_public_check | ||
63 | performs various sanity checks on the public key contained in | ||
64 | .Fa ctx | ||
65 | but only supports a small number of key types by default. | ||
66 | It preferably uses the function | ||
67 | .Fa public_check | ||
68 | configured for | ||
69 | .Fa ctx | ||
70 | with | ||
71 | .Xr EVP_PKEY_meth_set_public_check 3 . | ||
72 | It falls back to the function | ||
73 | .Fa pkey_public_check | ||
74 | configured for the private key contained in | ||
75 | .Fa ctx | ||
76 | with | ||
77 | .Xr EVP_PKEY_asn1_set_public_check 3 . | ||
78 | If that wasn't configured either, it attempts to use the following | ||
79 | check functions: | ||
80 | .Pp | ||
81 | .Bl -tag -width 3n -compact -offset -indent | ||
82 | .It DH | ||
83 | .Xr DH_check_pub_key 3 | ||
84 | .It EC | ||
85 | .Xr EC_KEY_check_key 3 | ||
86 | .It RSA | ||
87 | not supported, return value \-2 | ||
88 | .El | ||
89 | .Pp | ||
90 | .Fn EVP_PKEY_param_check | ||
91 | performs various sanity checks on the key parameters contained in | ||
92 | .Fa ctx | ||
93 | but only supports a small number of key types by default. | ||
94 | It preferably uses the function | ||
95 | .Fa check | ||
96 | configured for | ||
97 | .Fa ctx | ||
98 | with | ||
99 | .Xr EVP_PKEY_meth_set_param_check 3 . | ||
100 | It falls back to the function | ||
101 | .Fa pkey_check | ||
102 | configured for the private key contained in | ||
103 | .Fa ctx | ||
104 | with | ||
105 | .Xr EVP_PKEY_asn1_set_param_check 3 . | ||
106 | If that wasn't configured either, it attempts to use the following | ||
107 | check functions: | ||
108 | .Pp | ||
109 | .Bl -tag -width 3n -compact -offset -indent | ||
110 | .It DH | ||
111 | .Xr DH_check 3 | ||
112 | .It EC | ||
113 | .Xr EC_GROUP_check 3 | ||
114 | .It RSA | ||
115 | not supported, return value \-2 | ||
116 | .El | ||
117 | .Sh RETURN VALUES | ||
118 | These functions return 1 if the check was performed and no problem | ||
119 | was found, 0 if a problem was found or if the check could not be | ||
120 | performed, for example because | ||
121 | .Fa ctx | ||
122 | does not contain an | ||
123 | .Vt EVP_PKEY | ||
124 | object, or \-2 if the required check function is neither configured for | ||
125 | .Fa ctx | ||
126 | nor for the | ||
127 | .Vt PKEY | ||
128 | contained therein, and the check in question is not supported by default | ||
129 | for the algorithm in question either. | ||
130 | .Sh SEE ALSO | ||
131 | .Xr DH_check 3 , | ||
132 | .Xr EC_GROUP_check 3 , | ||
133 | .Xr EC_KEY_new 3 , | ||
134 | .Xr EVP_PKEY_asn1_new 3 , | ||
135 | .Xr EVP_PKEY_CTX_new 3 , | ||
136 | .Xr EVP_PKEY_meth_new 3 , | ||
137 | .Xr EVP_PKEY_new 3 , | ||
138 | .Xr RSA_check_key 3 | ||
139 | .Sh HISTORY | ||
140 | These functions first appeared in OpenSSL 1.1.1 | ||
141 | and have been available since | ||
142 | .Ox 7.1 . | ||
143 | .Sh BUGS | ||
144 | For EC keys, | ||
145 | .Fn EVP_PKEY_public_check | ||
146 | also checks the | ||
147 | .Em private | ||
148 | key and fails if there is a problem with any of the private | ||
149 | components, even if no problem is found with the public key. | ||