diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_CTX_get_operation.3')
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_CTX_get_operation.3 | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_CTX_get_operation.3 b/src/lib/libcrypto/man/EVP_PKEY_CTX_get_operation.3 deleted file mode 100644 index 2482c746d4..0000000000 --- a/src/lib/libcrypto/man/EVP_PKEY_CTX_get_operation.3 +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_CTX_get_operation.3,v 1.3 2023/09/12 16:15:23 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2023 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: September 12 2023 $ | ||
18 | .Dt EVP_PKEY_CTX_GET_OPERATION 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm EVP_PKEY_CTX_get_operation , | ||
22 | .Nm EVP_PKEY_CTX_get0_pkey | ||
23 | .Nd inspect EVP_PKEY_CTX objects | ||
24 | .Sh SYNOPSIS | ||
25 | .In openssl/evp.h | ||
26 | .Ft int | ||
27 | .Fo EVP_PKEY_CTX_get_operation | ||
28 | .Fa "EVP_PKEY_CTX *ctx" | ||
29 | .Fc | ||
30 | .Ft EVP_PKEY * | ||
31 | .Fo EVP_PKEY_CTX_get0_pkey | ||
32 | .Fa "EVP_PKEY_CTX *ctx" | ||
33 | .Fc | ||
34 | .Sh DESCRIPTION | ||
35 | .Fn EVP_PKEY_CTX_get_operation | ||
36 | finds out which initialization function has been called on | ||
37 | .Fa ctx , | ||
38 | if any: | ||
39 | .Bl -column EVP_PKEY_OP_VERIFYRECO EVP_PKEY_verify_recover_init | ||
40 | .It return value Ta initialized with Ta e.g. for | ||
41 | .It Dv EVP_PKEY_OP_DECRYPT Ta Xr EVP_PKEY_decrypt_init 3 Ta RSA, SM2 | ||
42 | .It Dv EVP_PKEY_OP_DERIVE Ta Xr EVP_PKEY_derive_init 3 Ta HKDF | ||
43 | .It Dv EVP_PKEY_OP_ENCRYPT Ta Xr EVP_PKEY_encrypt_init 3 Ta RSA, SM2 | ||
44 | .It Dv EVP_PKEY_OP_KEYGEN Ta Xr EVP_PKEY_keygen_init 3 Ta almost all | ||
45 | .It Dv EVP_PKEY_OP_PARAMGEN Ta Xr EVP_PKEY_paramgen_init 3 Ta DH, DSA, EC | ||
46 | .It Dv EVP_PKEY_OP_SIGN Ta Xr EVP_PKEY_sign_init 3 Ta DSA,EC,RSA,SM2 | ||
47 | .It Dv EVP_PKEY_OP_SIGN Ta Xr EVP_DigestSignInit 3 Ta ED25519 | ||
48 | .It Dv EVP_PKEY_OP_SIGNCTX Ta Xr EVP_DigestSignInit 3 Ta CMAC, HMAC | ||
49 | .It Dv EVP_PKEY_OP_UNDEFINED Ta not initialized Ta NONE | ||
50 | .It Dv EVP_PKEY_OP_VERIFY Ta Xr EVP_PKEY_verify_init 3 Ta DSA,EC,RSA,SM2 | ||
51 | .It Dv EVP_PKEY_OP_VERIFY Ta Xr EVP_DigestVerifyInit 3 Ta ED25519 | ||
52 | .It Dv EVP_PKEY_OP_VERIFYCTX Ta Xr EVP_DigestVerifyInit 3 Ta no built-in | ||
53 | .It Dv EVP_PKEY_OP_VERIFYRECOVER Ta Xr EVP_PKEY_verify_recover_init 3 Ta RSA | ||
54 | .El | ||
55 | .Pp | ||
56 | The rightmost column of the above table shows examples of algorithms | ||
57 | the return values can occur for. | ||
58 | For example, if | ||
59 | .Xr EVP_PKEY_base_id 3 | ||
60 | returns | ||
61 | .Dv EVP_PKEY_HKDF , | ||
62 | then calling | ||
63 | .Fn EVP_PKEY_CTX_get_operation | ||
64 | on a | ||
65 | .Vt EVP_PKEY_CTX | ||
66 | using that key may return | ||
67 | .Dv EVP_PKEY_OP_DERIVE . | ||
68 | .Pp | ||
69 | If the return value is | ||
70 | .Dv EVP_PKEY_OP_SIGNCTX | ||
71 | or | ||
72 | .Dv EVP_PKEY_OP_VERIFYCTX , | ||
73 | the | ||
74 | .Fa ctx | ||
75 | supports | ||
76 | .Xr EVP_DigestSignUpdate 3 | ||
77 | or | ||
78 | .Xr EVP_DigestVerifyUpdate 3 , | ||
79 | respectively. | ||
80 | If the return value is | ||
81 | .Dv EVP_PKEY_OP_SIGN | ||
82 | or | ||
83 | .Dv EVP_PKEY_OP_VERIFY , | ||
84 | if does not, and only one-shot signing or verification is supported. | ||
85 | .Pp | ||
86 | The return value | ||
87 | .Dv EVP_PKEY_OP_UNDEFINED | ||
88 | can for example occur if the | ||
89 | .Fa ctx | ||
90 | was freshly returned from | ||
91 | .Xr EVP_PKEY_CTX_new 3 | ||
92 | or | ||
93 | .Xr EVP_PKEY_CTX_new_id 3 | ||
94 | and not yet initialized. | ||
95 | .Pp | ||
96 | The following masks are defined as the logical OR of two or more of the above | ||
97 | .Dv EVP_PKEY_OP_* | ||
98 | bits: | ||
99 | .Pp | ||
100 | .Bl -tag -width EVP_PKEY_OP_TYPE_NOGEN -compact | ||
101 | .It Dv EVP_PKEY_OP_TYPE_CRYPT | ||
102 | DECRYPT | ENCRYPT | ||
103 | .It Dv EVP_PKEY_OP_TYPE_GEN | ||
104 | KEYGEN | PARAMGEN | ||
105 | .It Dv EVP_PKEY_OP_TYPE_NOGEN | ||
106 | CRYPT | DERIVE | SIG | ||
107 | .It Dv EVP_PKEY_OP_TYPE_SIG | ||
108 | SIGN | SIGNCTX | VERIFY | VERIFYCTX | VERIFYRECOVER | ||
109 | .El | ||
110 | .Sh RETURN VALUES | ||
111 | .Fn EVP_PKEY_CTX_get_operation | ||
112 | returns one of the single-bit | ||
113 | .Dv EVP_PKEY_OP_* | ||
114 | constants or | ||
115 | .Dv EVP_PKEY_OP_UNDEFINED | ||
116 | if | ||
117 | .Fa ctx | ||
118 | is not initialized. | ||
119 | .Pp | ||
120 | .Fn EVP_PKEY_CTX_get0_pkey | ||
121 | returns an internal pointer to the | ||
122 | .Vt EVP_PKEY | ||
123 | object used by | ||
124 | .Fa ctx , | ||
125 | without incrementing its reference count. | ||
126 | .Sh SEE ALSO | ||
127 | .Xr evp 3 , | ||
128 | .Xr EVP_PKEY_base_id 3 , | ||
129 | .Xr EVP_PKEY_CTX_ctrl 3 , | ||
130 | .Xr EVP_PKEY_CTX_new 3 , | ||
131 | .Xr EVP_PKEY_new 3 | ||
132 | .Sh HISTORY | ||
133 | .Fn EVP_PKEY_CTX_get_operation | ||
134 | and | ||
135 | .Fn EVP_PKEY_CTX_get0_pkey | ||
136 | first appeared in OpenSSL 1.0.0 and have been available since | ||
137 | .Ox 4.9 . | ||