diff options
Diffstat (limited to 'src/lib/libcrypto/doc/OPENSSL_config.pod')
-rw-r--r-- | src/lib/libcrypto/doc/OPENSSL_config.pod | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/lib/libcrypto/doc/OPENSSL_config.pod b/src/lib/libcrypto/doc/OPENSSL_config.pod new file mode 100644 index 0000000000..16600620cc --- /dev/null +++ b/src/lib/libcrypto/doc/OPENSSL_config.pod | |||
@@ -0,0 +1,82 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | OPENSSL_config, OPENSSL_no_config - simple OpenSSL configuration functions | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/conf.h> | ||
10 | |||
11 | void OPENSSL_config(const char *config_name); | ||
12 | void OPENSSL_no_config(void); | ||
13 | |||
14 | =head1 DESCRIPTION | ||
15 | |||
16 | OPENSSL_config() configures OpenSSL using the standard B<openssl.cnf> | ||
17 | configuration file name using B<config_name>. If B<config_name> is NULL then | ||
18 | the default name B<openssl_conf> will be used. Any errors are ignored. Further | ||
19 | calls to OPENSSL_config() will have no effect. The configuration file format | ||
20 | is documented in the L<conf(5)|conf(5)> manual page. | ||
21 | |||
22 | OPENSSL_no_config() disables configuration. If called before OPENSSL_config() | ||
23 | no configuration takes place. | ||
24 | |||
25 | =head1 NOTES | ||
26 | |||
27 | It is B<strongly> recommended that B<all> new applications call OPENSSL_config() | ||
28 | or the more sophisticated functions such as CONF_modules_load() during | ||
29 | initialization (that is before starting any threads). By doing this | ||
30 | an application does not need to keep track of all configuration options | ||
31 | and some new functionality can be supported automatically. | ||
32 | |||
33 | It is also possible to automatically call OPENSSL_config() when an application | ||
34 | calls OPENSSL_add_all_algorithms() by compiling an application with the | ||
35 | preprocessor symbol B<OPENSSL_LOAD_CONF> #define'd. In this way configuration | ||
36 | can be added without source changes. | ||
37 | |||
38 | The environment variable B<OPENSSL_CONFIG> can be set to specify the location | ||
39 | of the configuration file. | ||
40 | |||
41 | Currently ASN1 OBJECTs and ENGINE configuration can be performed future | ||
42 | versions of OpenSSL will add new configuration options. | ||
43 | |||
44 | There are several reasons why calling the OpenSSL configuration routines is | ||
45 | advisable. For example new ENGINE functionality was added to OpenSSL 0.9.7. | ||
46 | In OpenSSL 0.9.7 control functions can be supported by ENGINEs, this can be | ||
47 | used (among other things) to load dynamic ENGINEs from shared libraries (DSOs). | ||
48 | However very few applications currently support the control interface and so | ||
49 | very few can load and use dynamic ENGINEs. Equally in future more sophisticated | ||
50 | ENGINEs will require certain control operations to customize them. If an | ||
51 | application calls OPENSSL_config() it doesn't need to know or care about | ||
52 | ENGINE control operations because they can be performed by editing a | ||
53 | configuration file. | ||
54 | |||
55 | Applications should free up configuration at application closedown by calling | ||
56 | CONF_modules_free(). | ||
57 | |||
58 | =head1 RESTRICTIONS | ||
59 | |||
60 | The OPENSSL_config() function is designed to be a very simple "call it and | ||
61 | forget it" function. As a result its behaviour is somewhat limited. It ignores | ||
62 | all errors silently and it can only load from the standard configuration file | ||
63 | location for example. | ||
64 | |||
65 | It is however B<much> better than nothing. Applications which need finer | ||
66 | control over their configuration functionality should use the configuration | ||
67 | functions such as CONF_load_modules() directly. | ||
68 | |||
69 | =head1 RETURN VALUES | ||
70 | |||
71 | Neither OPENSSL_config() nor OPENSSL_no_config() return a value. | ||
72 | |||
73 | =head1 SEE ALSO | ||
74 | |||
75 | L<conf(5)|conf(5)>, L<CONF_load_modules_file(3)|CONF_load_modules_file(3)>, | ||
76 | L<CONF_modules_free(3),CONF_modules_free(3)> | ||
77 | |||
78 | =head1 HISTORY | ||
79 | |||
80 | OPENSSL_config() and OPENSSL_no_config() first appeared in OpenSSL 0.9.7 | ||
81 | |||
82 | =cut | ||