1WARNING WARNING WARNING!!! 2 3This stuff is experimental, may change radically or be deleted altogether 4before OpenSSL 0.9.7 release. You have been warned! 5 6Configuration modules. These are a set of modules which can perform 7various configuration functions. 8 9Currently the routines should be called at most once when an application 10starts up: that is before it starts any threads. 11 12The routines read a configuration file set up like this: 13 14----- 15#default section 16openssl_init=init_section 17 18[init_section] 19 20module1=value1 21#Second instance of module1 22module1.1=valueX 23module2=value2 24module3=dso_literal 25module4=dso_section 26 27[dso_section] 28 29path=/some/path/to/some/dso.so 30other_stuff=other_value 31---- 32 33When this file is loaded a configuration module with the specified 34string (module* in the above example) is looked up and its init 35function called as: 36 37int conf_init_func(CONF_IMODULE *md, CONF *cnf); 38 39The function can then take whatever action is appropriate, for example 40further lookups based on the value. Multiple instances of the same 41config module can be loaded. 42 43When the application closes down the modules are cleaned up by calling 44an optional finish function: 45 46void conf_finish_func(CONF_IMODULE *md); 47 48The finish functions are called in reverse order: that is the last module 49loaded is the first one cleaned up. 50 51If no module exists with a given name then an attempt is made to load 52a DSO with the supplied name. This might mean that "module3" attempts 53to load a DSO called libmodule3.so or module3.dll for example. An explicit 54DSO name can be given by including a separate section as in the module4 example 55above. 56 57The DSO is expected to at least contain an initialization function: 58 59int OPENSSL_init(CONF_IMODULE *md, CONF *cnf); 60 61and may also include a finish function: 62 63void OPENSSL_finish(CONF_IMODULE *md); 64 65Static modules can also be added using, 66 67int CONF_module_add(char *name, dso_mod_init_func *ifunc, dso_mod_finish_func *ffunc); 68 69where "name" is the name in the configuration file this function corresponds to. 70 71A set of builtin modules (currently only an ASN1 non functional test module) can be 72added by calling OPENSSL_load_builtin_modules(). 73 74The function OPENSSL_config() is intended as a simple configuration function that 75any application can call to perform various default configuration tasks. It uses the 76file openssl.cnf in the usual locations. 77 78 79