1.Dd $Mdocdate: November 3 2016 $ 2.Dt OPENSSL_ADD_ALL_ALGORITHMS 3 3.Os 4.Sh NAME 5.Nm OpenSSL_add_all_algorithms , 6.Nm OpenSSL_add_all_ciphers , 7.Nm OpenSSL_add_all_digests , 8.Nm EVP_cleanup 9.Nd add algorithms to internal table 10.Sh SYNOPSIS 11.In openssl/evp.h 12.Ft void 13.Fn OpenSSL_add_all_algorithms void 14.Ft void 15.Fn OpenSSL_add_all_ciphers void 16.Ft void 17.Fn OpenSSL_add_all_digests void 18.Ft void 19.Fn EVP_cleanup void 20.Sh DESCRIPTION 21OpenSSL keeps an internal table of digest algorithms and ciphers. 22It uses this table to lookup ciphers via functions such as 23.Xr EVP_get_cipherbyname 3 . 24.Pp 25.Fn OpenSSL_add_all_algorithms 26adds all algorithms to the table (digests and ciphers). 27.Pp 28.Fn OpenSSL_add_all_digests 29adds all digest algorithms to the table. 30.Pp 31.Fn OpenSSL_add_all_ciphers 32adds all encryption algorithms to the table including password based 33encryption algorithms. 34.Pp 35.Fn EVP_cleanup 36removes all ciphers and digests from the table. 37.Pp 38A typical application will call 39.Fn OpenSSL_add_all_algorithms 40initially and 41.Fn EVP_cleanup 42before exiting. 43.Pp 44An application does not need to add algorithms to use them explicitly, 45for example by 46.Xr EVP_sha1 3 . 47It just needs to add them if it (or any of the functions it calls) needs 48to lookup algorithms. 49.Pp 50The cipher and digest lookup functions are used in many parts of the 51library. 52If the table is not initialized, several functions will misbehave and 53complain they cannot find algorithms. 54This includes the PEM, PKCS#12, SSL and S/MIME libraries. 55This is a common query in the OpenSSL mailing lists. 56.Pp 57Calling 58.Fn OpenSSL_add_all_algorithms 59links in all algorithms: as a result a statically linked executable can 60be quite large. 61If this is important, it is possible to just add the required ciphers and 62digests. 63.Sh SEE ALSO 64.Xr evp 3 , 65.Xr EVP_DigestInit 3 , 66.Xr EVP_EncryptInit 3 67.Sh BUGS 68Although the functions do not return error codes, it is possible for them 69to fail. 70This will only happen as a result of a memory allocation failure so this 71is not too much of a problem in practice. 72