SSLEAY_ADD_ALL_ALGORITHMS(3ssl)
πΈ OPENSSL_ADD_ALL_ALGORITHMS β bestie's guide to the algorithm table β¨
okay so this page lives in the OpenSSL library (openssl/evp.h, iykyk) and it's all about the internal table of digests and ciphers. pull up a chair π
π NAME π
OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests, EVP_cleanup, SSLeay_add_all_algorithms β the whole friend group that adds algorithms to the internal table π«Ά
β¨ SYNOPSIS β¨
#include <openssl/evp.h>
void
OpenSSL_add_all_algorithms(void);
void
OpenSSL_add_all_ciphers(void);
void
OpenSSL_add_all_digests(void);
void
EVP_cleanup(void);
void
SSLeay_add_all_algorithms(void);
π DESCRIPTION π
so first things first, bestie: these functions are deprecated. like, fully. the docs straight up say it is never useful for any application program to call any of them explicitly, because the library already calls them internally whenever needed. so you don't have to do anything. it's giving "the library has main character energy and handles it" π
OpenSSL keeps an internal table of digest algorithms and ciphers. it uses this table to look up ciphers via functions such as EVP_get_cipherbyname(3). think of it as the group chat directory of every digest and cipher OpenSSL knows about π
Here's the rundown on each one:
OpenSSL_add_all_algorithms()β adds all the algorithms to the table (digests and ciphers). and if the application was compiled with the preprocessor symbolOPENSSL_LOAD_CONF#define'd, it also callsOPENSSL_config(3)with aNULLargument, which loads the default configuration file. sneaky little bonus behavior, love that for it πOpenSSL_add_all_digests()β adds all the digest algorithms to the table. digests only, no ciphers πOpenSSL_add_all_ciphers()β adds all the encryption algorithms to the table, and yes that includes password based encryption algorithms π
real talk: if any of the above functions is called more than once, only the first call has an effect. so spamming them does nothing. periodt π
EVP_cleanup() is the chaotic one β it removes all ciphers and digests from the table, and it also calls OBJ_NAME_cleanup(3) with an argument of -1. that resets the global associative array of names and all signature algorithm definitions back to their default states, removing all application-defined types, key-value pairs, and aliases β including any that are unrelated to the EVP library. π so yeah, it's a whole spring cleaning, not just a tidy-up of its own room. be aware of that before you call it.
SSLeay_add_all_algorithms() is just a deprecated alias for OpenSSL_add_all_algorithms(). same energy, older name π§
and a lil detail: OpenSSL_add_all_algorithms() and SSLeay_add_all_algorithms() are implemented as macros, not real functions. iconic πΈ
π¦ SEE ALSO π¦
β HISTORY β
EVP_cleanup(),SSLeay_add_all_algorithms(), and their precursor functionsSSLeay_add_all_ciphers()andSSLeay_add_all_digests()first appeared in SSLeay 0.8.0 and have been available since OpenBSD 2.4. vintage πOpenSSL_add_all_algorithms(),OpenSSL_add_all_ciphers(), andOpenSSL_add_all_digests()first appeared in OpenSSL 0.9.5 and have been available since OpenBSD 2.7. glow up β¨
π BUGS π
okay so here's the tea: these functions do not return error codes, but it is possible for them to fail π¬ the only way that happens is a memory allocation failure, so honestly it's not too much of a problem in practice. lowkey fine, but now you know π
and that's the whole page, bestie β go forth and let the library call these for you π«Ά
mwah π β from the Debian build of these man pages, dated March 4, 2024, filed under OPENSSL_ADD_ALL_ALGORITHMS(3) π
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 2000, 2003, 2013 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms