diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_add_cipher.3')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_add_cipher.3 | 190 |
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 | ||
| 58 | adds | ||
| 59 | .Fa cipher | ||
| 60 | to a global lookup table so that it can be retrieved with | ||
| 61 | .Xr EVP_get_cipherbyname 3 | ||
| 62 | using both its long and short names, | ||
| 63 | as determined by the | ||
| 64 | .Fa cipher Ns 's | ||
| 65 | NID via | ||
| 66 | .Xr OBJ_nid2ln 3 | ||
| 67 | and | ||
| 68 | .Xr OBJ_nid2sn 3 . | ||
| 69 | It is the caller's responsibility to ensure that the long | ||
| 70 | and short names are not | ||
| 71 | .Dv NULL . | ||
| 72 | Internally, the lookup table is the global associative array and | ||
| 73 | .Xr OBJ_NAME_add 3 | ||
| 74 | is used to add two key-value pairs with value pointer | ||
| 75 | .Fa cipher | ||
| 76 | and the keys consisting of the names and | ||
| 77 | the type | ||
| 78 | .Dv OBJ_NAME_TYPE_CIPHER_METH . | ||
| 79 | .Pp | ||
| 80 | .Fn EVP_add_cipher_alias | ||
| 81 | and | ||
| 82 | .Fn EVP_delete_cipher_alias | ||
| 83 | add and remove the | ||
| 84 | .Fa alias | ||
| 85 | for the cipher | ||
| 86 | .Fa name . | ||
| 87 | They are implemented as macros wrapping | ||
| 88 | .Xr OBJ_NAME_add 3 | ||
| 89 | and | ||
| 90 | .Xr OBJ_NAME_remove 3 | ||
| 91 | with | ||
| 92 | .Fa type | ||
| 93 | set to the bitwise or of | ||
| 94 | .Dv OBJ_NAME_TYPE_CIPHER_METH | ||
| 95 | and | ||
| 96 | .Dv OBJ_NAME_ALIAS . | ||
| 97 | .Pp | ||
| 98 | .Fn EVP_add_digest | ||
| 99 | adds | ||
| 100 | .Fa md | ||
| 101 | to a global lookup table so that it can be retrieved with | ||
| 102 | .Xr EVP_get_digestbyname 3 | ||
| 103 | using both its long and short names, | ||
| 104 | as determined by the | ||
| 105 | .Fa md Ns 's | ||
| 106 | NID via | ||
| 107 | .Xr OBJ_nid2ln 3 | ||
| 108 | and | ||
| 109 | .Xr OBJ_nid2sn 3 . | ||
| 110 | If the | ||
| 111 | .Fa md | ||
| 112 | has an associated public key signing algorithm (see | ||
| 113 | .Xr EVP_MD_pkey_type 3 ) | ||
| 114 | distinct from the | ||
| 115 | .Fa md , | ||
| 116 | the signing algorithm's short and long names are added as aliases for | ||
| 117 | the short name of | ||
| 118 | .Fa md . | ||
| 119 | It is the caller's responsibility to ensure that all long | ||
| 120 | and short names are not | ||
| 121 | .Dv NULL . | ||
| 122 | Internally, the lookup table is the global associative array and | ||
| 123 | .Xr OBJ_NAME_add 3 | ||
| 124 | is used to add two key-value pairs with value pointer | ||
| 125 | .Fa md | ||
| 126 | and the keys consisting of the names and | ||
| 127 | the type | ||
| 128 | .Dv OBJ_NAME_TYPE_MD_METH . | ||
| 129 | The aliases are added with | ||
| 130 | .Fn EVP_add_digest_alias . | ||
| 131 | .Pp | ||
| 132 | .Fn EVP_add_digest_alias | ||
| 133 | and | ||
| 134 | .Fn EVP_delete_digest_alias | ||
| 135 | add and remove the | ||
| 136 | .Fa alias | ||
| 137 | for the digest | ||
| 138 | .Fa name . | ||
| 139 | They are implemented as macros wrapping | ||
| 140 | .Xr OBJ_NAME_add 3 | ||
| 141 | and | ||
| 142 | .Xr OBJ_NAME_remove 3 | ||
| 143 | with | ||
| 144 | .Fa type | ||
| 145 | set to the bitwise or of | ||
| 146 | .Dv OBJ_NAME_TYPE_MD_METH | ||
| 147 | and | ||
| 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 , | ||
| 153 | and | ||
| 154 | .Fn EVP_add_digest_alias | ||
| 155 | return 1 on success or 0 if memory allocation fails. | ||
| 156 | .Pp | ||
| 157 | .Fn EVP_delete_cipher_alias | ||
| 158 | and | ||
| 159 | .Fn EVP_delete_digest_alias | ||
| 160 | return 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 | ||
| 172 | and | ||
| 173 | .Fn EVP_add_digest | ||
| 174 | first 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 , | ||
| 180 | and | ||
| 181 | .Fn EVP_delete_digest_alias | ||
| 182 | first appeared in OpenSSL 0.9.4 and have been available since | ||
| 183 | .Ox 2.6 . | ||
| 184 | .Sh BUGS | ||
| 185 | Key-value pairs already added before an error occurred | ||
| 186 | remain in the global associative array, | ||
| 187 | leaving it in an unknown state. | ||
| 188 | .Pp | ||
| 189 | While aliases can be added and removed, there is no dedicated API | ||
| 190 | to remove added ciphers or digests. | ||
