OPENSSL_config 3 2005-11-24 0.9.9-dev OpenSSL

NAME

OPENSSL_config, OPENSSL_no_config - simple OpenSSL configuration functions

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 void OPENSSL_config(const char *config_name);
 void OPENSSL_no_config(void);

DESCRIPTION

_O_P_E_N_S_S_L___c_o_n_f_i_g_(_) configures OpenSSL using the standard ooppeennssssll..ccnnff configuration file name using ccoonnffiigg__nnaammee. If ccoonnffiigg__nnaammee is NULL then the default name ooppeennssssll__ccoonnff will be used. Any errors are ignored. Further calls to _O_P_E_N_S_S_L___c_o_n_f_i_g_(_) will have no effect. The configuration file format is documented in the _c_o_n_f(5) manual page.

_O_P_E_N_S_S_L___n_o___c_o_n_f_i_g_(_) disables configuration. If called before _O_P_E_N_S_S_L___c_o_n_f_i_g_(_) no configuration takes place.

NOTES

It is ssttrroonnggllyy recommended that aallll new applications call _O_P_E_N_S_S_L___c_o_n_f_i_g_(_) or the more sophisticated functions such as _C_O_N_F___m_o_d_u_l_e_s___l_o_a_d_(_) during initialization (that is before starting any threads). By doing this an application does not need to keep track of all configuration options and some new functionality can be supported automatically.

It is also possible to automatically call _O_P_E_N_S_S_L___c_o_n_f_i_g_(_) when an application calls _O_P_E_N_S_S_L___a_d_d___a_l_l___a_l_g_o_r_i_t_h_m_s_(_) by compiling an application with the preprocessor symbol OOPPEENNSSSSLL__LLOOAADD__CCOONNFF #define'd. In this way configuration can be added without source changes.

The environment variable OOPPEENNSSSSLL__CCOONNFF can be set to specify the location of the configuration file.

Currently ASN1 OBJECTs and ENGINE configuration can be performed future versions of OpenSSL will add new configuration options.

There are several reasons why calling the OpenSSL configuration routines is advisable. For example new ENGINE functionality was added to OpenSSL 0.9.7. In OpenSSL 0.9.7 control functions can be supported by ENGINEs, this can be used (among other things) to load dynamic ENGINEs from shared libraries (DSOs). However very few applications currently support the control interface and so very few can load and use dynamic ENGINEs. Equally in future more sophisticated ENGINEs will require certain control operations to customize them. If an application calls _O_P_E_N_S_S_L___c_o_n_f_i_g_(_) it doesn't need to know or care about ENGINE control operations because they can be performed by editing a configuration file.

Applications should free up configuration at application closedown by calling _C_O_N_F___m_o_d_u_l_e_s___f_r_e_e_(_).

RESTRICTIONS

The _O_P_E_N_S_S_L___c_o_n_f_i_g_(_) function is designed to be a very simple "call it and forget it" function. As a result its behaviour is somewhat limited. It ignores all errors silently and it can only load from the standard configuration file location for example.

It is however mmuucchh better than nothing. Applications which need finer control over their configuration functionality should use the configuration functions such as _C_O_N_F___l_o_a_d___m_o_d_u_l_e_s_(_) directly.

RETURN VALUES

Neither _O_P_E_N_S_S_L___c_o_n_f_i_g_(_) nor _O_P_E_N_S_S_L___n_o___c_o_n_f_i_g_(_) return a value.

SEE ALSO

_c_o_n_f(5), _C_O_N_F___l_o_a_d___m_o_d_u_l_e_s___f_i_l_e(3), _C_O_N_F___m_o_d_u_l_e_s___f_r_e_e(3),_C_O_N_F___m_o_d_u_l_e_s___f_r_e_e(3)

HISTORY

_O_P_E_N_S_S_L___c_o_n_f_i_g_(_) and _O_P_E_N_S_S_L___n_o___c_o_n_f_i_g_(_) first appeared in OpenSSL 0.9.7