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