1*cd72d073Stb.\" $OpenBSD: OpenSSL_add_all_algorithms.3,v 1.16 2024/03/04 19:04:47 tb Exp $ 241d72ce5Sschwarze.\" full merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400 38974101aSjmc.\" 42e2687a1Sschwarze.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 52e2687a1Sschwarze.\" Copyright (c) 2000, 2003, 2013 The OpenSSL Project. All rights reserved. 62e2687a1Sschwarze.\" 72e2687a1Sschwarze.\" Redistribution and use in source and binary forms, with or without 82e2687a1Sschwarze.\" modification, are permitted provided that the following conditions 92e2687a1Sschwarze.\" are met: 102e2687a1Sschwarze.\" 112e2687a1Sschwarze.\" 1. Redistributions of source code must retain the above copyright 122e2687a1Sschwarze.\" notice, this list of conditions and the following disclaimer. 132e2687a1Sschwarze.\" 142e2687a1Sschwarze.\" 2. Redistributions in binary form must reproduce the above copyright 152e2687a1Sschwarze.\" notice, this list of conditions and the following disclaimer in 162e2687a1Sschwarze.\" the documentation and/or other materials provided with the 172e2687a1Sschwarze.\" distribution. 182e2687a1Sschwarze.\" 192e2687a1Sschwarze.\" 3. All advertising materials mentioning features or use of this 202e2687a1Sschwarze.\" software must display the following acknowledgment: 212e2687a1Sschwarze.\" "This product includes software developed by the OpenSSL Project 222e2687a1Sschwarze.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 232e2687a1Sschwarze.\" 242e2687a1Sschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 252e2687a1Sschwarze.\" endorse or promote products derived from this software without 262e2687a1Sschwarze.\" prior written permission. For written permission, please contact 272e2687a1Sschwarze.\" openssl-core@openssl.org. 282e2687a1Sschwarze.\" 292e2687a1Sschwarze.\" 5. Products derived from this software may not be called "OpenSSL" 302e2687a1Sschwarze.\" nor may "OpenSSL" appear in their names without prior written 312e2687a1Sschwarze.\" permission of the OpenSSL Project. 322e2687a1Sschwarze.\" 332e2687a1Sschwarze.\" 6. Redistributions of any form whatsoever must retain the following 342e2687a1Sschwarze.\" acknowledgment: 352e2687a1Sschwarze.\" "This product includes software developed by the OpenSSL Project 362e2687a1Sschwarze.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" 372e2687a1Sschwarze.\" 382e2687a1Sschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 392e2687a1Sschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 402e2687a1Sschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 412e2687a1Sschwarze.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 422e2687a1Sschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 432e2687a1Sschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 442e2687a1Sschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 452e2687a1Sschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 462e2687a1Sschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 472e2687a1Sschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 482e2687a1Sschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 492e2687a1Sschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE. 502e2687a1Sschwarze.\" 51*cd72d073Stb.Dd $Mdocdate: March 4 2024 $ 52d18d1815Sschwarze.Dt OPENSSL_ADD_ALL_ALGORITHMS 3 53d18d1815Sschwarze.Os 54d18d1815Sschwarze.Sh NAME 55d18d1815Sschwarze.Nm OpenSSL_add_all_algorithms , 56d18d1815Sschwarze.Nm OpenSSL_add_all_ciphers , 57d18d1815Sschwarze.Nm OpenSSL_add_all_digests , 588259d2c1Sschwarze.Nm EVP_cleanup , 598259d2c1Sschwarze.Nm SSLeay_add_all_algorithms 608259d2c1Sschwarze.\" .Nm OPENSSL_add_all_algorithms_conf , 618259d2c1Sschwarze.\" .Nm OPENSSL_add_all_algorithms_noconf , 628259d2c1Sschwarze.\" .Nm SSLeay_add_all_ciphers , and 638259d2c1Sschwarze.\" .Nm SSLeay_add_all_digests are intentionally undocumented 648259d2c1Sschwarze.\" because they are unused aliases. 65d18d1815Sschwarze.Nd add algorithms to internal table 66d18d1815Sschwarze.Sh SYNOPSIS 67d18d1815Sschwarze.In openssl/evp.h 68d18d1815Sschwarze.Ft void 69d18d1815Sschwarze.Fn OpenSSL_add_all_algorithms void 70d18d1815Sschwarze.Ft void 71d18d1815Sschwarze.Fn OpenSSL_add_all_ciphers void 72d18d1815Sschwarze.Ft void 73d18d1815Sschwarze.Fn OpenSSL_add_all_digests void 74d18d1815Sschwarze.Ft void 75d18d1815Sschwarze.Fn EVP_cleanup void 768259d2c1Sschwarze.Ft void 778259d2c1Sschwarze.Fn SSLeay_add_all_algorithms void 78d18d1815Sschwarze.Sh DESCRIPTION 7941d72ce5SschwarzeThese functions are deprecated. 8041d72ce5SschwarzeIt is never useful for any application program 8141d72ce5Sschwarzeto call any of them explicitly. 8241d72ce5SschwarzeThe library automatically calls them internally whenever needed. 8341d72ce5Sschwarze.Pp 84d18d1815SschwarzeOpenSSL keeps an internal table of digest algorithms and ciphers. 85d18d1815SschwarzeIt uses this table to look up ciphers via functions such as 86d18d1815Sschwarze.Xr EVP_get_cipherbyname 3 . 87d18d1815Sschwarze.Pp 88d18d1815Sschwarze.Fn OpenSSL_add_all_algorithms 89d18d1815Sschwarzeadds all algorithms to the table (digests and ciphers). 90536f31e8SschwarzeIf an application is compiled with the preprocessor symbol 91536f31e8Sschwarze.Dv OPENSSL_LOAD_CONF 92536f31e8Sschwarze#define'd, it also calls 93536f31e8Sschwarze.Xr OPENSSL_config 3 94536f31e8Sschwarzewith a 95536f31e8Sschwarze.Dv NULL 96536f31e8Sschwarzeargument, loading the default configuration file. 97d18d1815Sschwarze.Pp 98d18d1815Sschwarze.Fn OpenSSL_add_all_digests 99d18d1815Sschwarzeadds all digest algorithms to the table. 100d18d1815Sschwarze.Pp 101d18d1815Sschwarze.Fn OpenSSL_add_all_ciphers 102d18d1815Sschwarzeadds all encryption algorithms to the table including password based 103d18d1815Sschwarzeencryption algorithms. 104d18d1815Sschwarze.Pp 10541d72ce5SschwarzeIf any of the above functions is called more than once, 10641d72ce5Sschwarzeonly the first call has an effect. 10741d72ce5Sschwarze.Pp 108d18d1815Sschwarze.Fn EVP_cleanup 109d362e6b3Sschwarzeremoves all ciphers and digests from the table and also calls 110d362e6b3Sschwarze.Xr OBJ_NAME_cleanup 3 111cbc86b4eStbwith an argument of \-1 , 112eb4902cfSschwarzethus resetting the global associative array of names 113eb4902cfSschwarzeand all signature algorithm definitions to their default states, 114cbc86b4eStbremoving all application-defined types, key-value pairs, and aliases, 115eb4902cfSschwarzeincluding any that are unrelated to the EVP library. 1168259d2c1Sschwarze.Pp 1178259d2c1Sschwarze.Fn SSLeay_add_all_algorithms 1188259d2c1Sschwarzeis a deprecated alias for 1198259d2c1Sschwarze.Fn OpenSSL_add_all_algorithms . 12089729f59Sschwarze.Pp 12189729f59Sschwarze.Fn OpenSSL_add_all_algorithms 12289729f59Sschwarzeand 12389729f59Sschwarze.Fn SSLeay_add_all_algorithms 12489729f59Sschwarzeare implemented as macros. 125d18d1815Sschwarze.Sh SEE ALSO 126d18d1815Sschwarze.Xr evp 3 , 127d18d1815Sschwarze.Xr EVP_DigestInit 3 , 12841d72ce5Sschwarze.Xr EVP_EncryptInit 3 , 1293ef33cd2Sschwarze.Xr OBJ_cleanup 3 , 130d362e6b3Sschwarze.Xr OBJ_NAME_add 3 , 131536f31e8Sschwarze.Xr OPENSSL_config 3 13241d72ce5Sschwarze.Sh HISTORY 1338259d2c1Sschwarze.Fn EVP_cleanup , 13441d72ce5Sschwarze.Fn SSLeay_add_all_algorithms , 1358259d2c1Sschwarzeand precursor functions 1368259d2c1Sschwarze.Fn SSLeay_add_all_ciphers 13741d72ce5Sschwarzeand 13841d72ce5Sschwarze.Fn SSLeay_add_all_digests 13910e00d17Sschwarzefirst appeared in SSLeay 0.8.0 and have been available since 14041d72ce5Sschwarze.Ox 2.4 . 141958c08b5Sschwarze.Pp 142958c08b5Sschwarze.Fn OpenSSL_add_all_algorithms , 143958c08b5Sschwarze.Fn OpenSSL_add_all_ciphers , 144958c08b5Sschwarzeand 145958c08b5Sschwarze.Fn OpenSSL_add_all_digests 146958c08b5Sschwarzefirst appeared in OpenSSL 0.9.5 and have been available since 147958c08b5Sschwarze.Ox 2.7 . 148d18d1815Sschwarze.Sh BUGS 149d18d1815SschwarzeAlthough the functions do not return error codes, it is possible for them 150d18d1815Sschwarzeto fail. 151d18d1815SschwarzeThis will only happen as a result of a memory allocation failure so this 152d18d1815Sschwarzeis not too much of a problem in practice. 153