summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/EVP_add_cipher.3
diff options
context:
space:
mode:
authortb <>2024-03-04 19:04:47 +0000
committertb <>2024-03-04 19:04:47 +0000
commitcada8c5968a603c0e64c494712146ac29def42fc (patch)
tree8487e628c5d2b897b143fb942211b22201d6a3b5 /src/lib/libcrypto/man/EVP_add_cipher.3
parent3631802ae7ae28f5f5485e9cd7fd4cb7904be377 (diff)
downloadopenbsd-cada8c5968a603c0e64c494712146ac29def42fc.tar.gz
openbsd-cada8c5968a603c0e64c494712146ac29def42fc.tar.bz2
openbsd-cada8c5968a603c0e64c494712146ac29def42fc.zip
Remove EVP_add_{cipher,digest}* docs
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/man/EVP_add_cipher.3190
1 files changed, 0 insertions, 190 deletions
diff --git a/src/lib/libcrypto/man/EVP_add_cipher.3 b/src/lib/libcrypto/man/EVP_add_cipher.3
deleted file mode 100644
index 6cbfd2e390..0000000000
--- a/src/lib/libcrypto/man/EVP_add_cipher.3
+++ /dev/null
@@ -1,190 +0,0 @@
1.\" $OpenBSD: EVP_add_cipher.3,v 1.6 2023/08/25 18:39:04 schwarze Exp $
2.\"
3.\" Copyright (c) 2023 Theo Buehler <tb@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: August 25 2023 $
18.Dt EVP_ADD_CIPHER 3
19.Os
20.Sh NAME
21.Nm EVP_add_cipher ,
22.Nm EVP_add_cipher_alias ,
23.Nm EVP_delete_cipher_alias ,
24.Nm EVP_add_digest ,
25.Nm EVP_add_digest_alias ,
26.Nm EVP_delete_digest_alias
27.Nd maintain lookup tables for cipher and digest names
28.Sh SYNOPSIS
29.In openssl/evp.h
30.Ft int
31.Fo EVP_add_cipher
32.Fa "const EVP_CIPHER *cipher"
33.Fc
34.Ft int
35.Fo EVP_add_cipher_alias
36.Fa "const char *name"
37.Fa "const char *alias"
38.Fc
39.Ft int
40.Fo EVP_delete_cipher_alias
41.Fa "const char *alias"
42.Fc
43.Ft int
44.Fo EVP_add_digest
45.Fa "const EVP_MD *md"
46.Fc
47.Ft int
48.Fo EVP_add_digest_alias
49.Fa "const char *name"
50.Fa "const char *alias"
51.Fc
52.Ft int
53.Fo EVP_delete_digest_alias
54.Fa "const char *alias"
55.Fc
56.Sh DESCRIPTION
57.Fn EVP_add_cipher
58adds
59.Fa cipher
60to a global lookup table so that it can be retrieved with
61.Xr EVP_get_cipherbyname 3
62using both its long and short names,
63as determined by the
64.Fa cipher Ns 's
65NID via
66.Xr OBJ_nid2ln 3
67and
68.Xr OBJ_nid2sn 3 .
69It is the caller's responsibility to ensure that the long
70and short names are not
71.Dv NULL .
72Internally, the lookup table is the global associative array and
73.Xr OBJ_NAME_add 3
74is used to add two key-value pairs with value pointer
75.Fa cipher
76and the keys consisting of the names and
77the type
78.Dv OBJ_NAME_TYPE_CIPHER_METH .
79.Pp
80.Fn EVP_add_cipher_alias
81and
82.Fn EVP_delete_cipher_alias
83add and remove the
84.Fa alias
85for the cipher
86.Fa name .
87They are implemented as macros wrapping
88.Xr OBJ_NAME_add 3
89and
90.Xr OBJ_NAME_remove 3
91with
92.Fa type
93set to the bitwise or of
94.Dv OBJ_NAME_TYPE_CIPHER_METH
95and
96.Dv OBJ_NAME_ALIAS .
97.Pp
98.Fn EVP_add_digest
99adds
100.Fa md
101to a global lookup table so that it can be retrieved with
102.Xr EVP_get_digestbyname 3
103using both its long and short names,
104as determined by the
105.Fa md Ns 's
106NID via
107.Xr OBJ_nid2ln 3
108and
109.Xr OBJ_nid2sn 3 .
110If the
111.Fa md
112has an associated public key signing algorithm (see
113.Xr EVP_MD_pkey_type 3 )
114distinct from the
115.Fa md ,
116the signing algorithm's short and long names are added as aliases for
117the short name of
118.Fa md .
119It is the caller's responsibility to ensure that all long
120and short names are not
121.Dv NULL .
122Internally, the lookup table is the global associative array and
123.Xr OBJ_NAME_add 3
124is used to add two key-value pairs with value pointer
125.Fa md
126and the keys consisting of the names and
127the type
128.Dv OBJ_NAME_TYPE_MD_METH .
129The aliases are added with
130.Fn EVP_add_digest_alias .
131.Pp
132.Fn EVP_add_digest_alias
133and
134.Fn EVP_delete_digest_alias
135add and remove the
136.Fa alias
137for the digest
138.Fa name .
139They are implemented as macros wrapping
140.Xr OBJ_NAME_add 3
141and
142.Xr OBJ_NAME_remove 3
143with
144.Fa type
145set to the bitwise or of
146.Dv OBJ_NAME_TYPE_MD_METH
147and
148.Dv OBJ_NAME_ALIAS .
149.Sh RETURN VALUES
150.Fn EVP_add_cipher ,
151.Fn EVP_add_cipher_alias ,
152.Fn EVP_add_digest ,
153and
154.Fn EVP_add_digest_alias
155return 1 on success or 0 if memory allocation fails.
156.Pp
157.Fn EVP_delete_cipher_alias
158and
159.Fn EVP_delete_digest_alias
160return 1 if one alias was removed or 0 otherwise.
161.Sh SEE ALSO
162.Xr evp 3 ,
163.Xr EVP_CIPHER_meth_new 3 ,
164.Xr EVP_get_cipherbyname 3 ,
165.Xr EVP_get_digestbyname 3 ,
166.Xr EVP_MD_meth_new 3 ,
167.Xr OBJ_create 3 ,
168.Xr OBJ_NAME_add 3 ,
169.Xr OpenSSL_add_all_algorithms 3
170.Sh HISTORY
171.Fn EVP_add_cipher
172and
173.Fn EVP_add_digest
174first appeared in OpenSSL 0.9.0 and have been available since
175.Ox 2.4 .
176.Pp
177.Fn EVP_add_cipher_alias ,
178.Fn EVP_delete_cipher_alias ,
179.Fn EVP_add_digest_alias ,
180and
181.Fn EVP_delete_digest_alias
182first appeared in OpenSSL 0.9.4 and have been available since
183.Ox 2.6 .
184.Sh BUGS
185Key-value pairs already added before an error occurred
186remain in the global associative array,
187leaving it in an unknown state.
188.Pp
189While aliases can be added and removed, there is no dedicated API
190to remove added ciphers or digests.