OpenSSL_add_all_algorithms 3 2004-03-19 0.9.9-dev OpenSSL

NAME

OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests - add algorithms to internal table

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 void OpenSSL_add_all_algorithms(void);
 void OpenSSL_add_all_ciphers(void);
 void OpenSSL_add_all_digests(void);


 void EVP_cleanup(void);

DESCRIPTION

OpenSSL keeps an internal table of digest algorithms and ciphers. It uses this table to lookup ciphers via functions such as _E_V_P___g_e_t___c_i_p_h_e_r___b_y_n_a_m_e_(_).

_O_p_e_n_S_S_L___a_d_d___a_l_l___d_i_g_e_s_t_s_(_) adds all digest algorithms to the table.

_O_p_e_n_S_S_L___a_d_d___a_l_l___a_l_g_o_r_i_t_h_m_s_(_) adds all algorithms to the table (digests and ciphers).

_O_p_e_n_S_S_L___a_d_d___a_l_l___c_i_p_h_e_r_s_(_) adds all encryption algorithms to the table including password based encryption algorithms.

_E_V_P___c_l_e_a_n_u_p_(_) removes all ciphers and digests from the table.

RETURN VALUES

None of the functions return a value.

NOTES

A typical application will call _O_p_e_n_S_S_L___a_d_d___a_l_l___a_l_g_o_r_i_t_h_m_s_(_) initially and _E_V_P___c_l_e_a_n_u_p_(_) before exiting.

An application does not need to add algorithms to use them explicitly, for example by _E_V_P___s_h_a_1_(_). It just needs to add them if it (or any of the functions it calls) needs to lookup algorithms.

The cipher and digest lookup functions are used in many parts of the library. If the table is not initialized several functions will misbehave and complain they cannot find algorithms. This includes the PEM, PKCS#12, SSL and S/MIME libraries. This is a common query in the OpenSSL mailing lists.

Calling _O_p_e_n_S_S_L___a_d_d___a_l_l___a_l_g_o_r_i_t_h_m_s_(_) links in all algorithms: as a result a statically linked executable can be quite large. If this is important it is possible to just add the required ciphers and digests.

BUGS

Although the functions do not return error codes it is possible for them to fail. This will only happen as a result of a memory allocation failure so this is not too much of a problem in practice.

SEE ALSO

_o_p_e_n_s_s_l___e_v_p(3), _E_V_P___D_i_g_e_s_t_I_n_i_t(3), _E_V_P___E_n_c_r_y_p_t_I_n_i_t(3)