1OPENSSL_config(3)                   OpenSSL                  OPENSSL_config(3)
2
3
4

NAME

6       OPENSSL_config, OPENSSL_no_config - simple OpenSSL configuration func‐
7       tions
8

SYNOPSIS

10        #include <openssl/conf.h>
11
12        void OPENSSL_config(const char *config_name);
13        void OPENSSL_no_config(void);
14

DESCRIPTION

16       OPENSSL_config() configures OpenSSL using the standard openssl.cnf con‐
17       figuration file name using config_name. If config_name is NULL then the
18       default name openssl_conf will be used. Any errors are ignored. Further
19       calls to OPENSSL_config() will have no effect. The configuration file
20       format is documented in the conf(5) manual page.
21
22       OPENSSL_no_config() disables configuration. If called before
23       OPENSSL_config() no configuration takes place.
24

NOTES

26       It is strongly recommended that all new applications call OPENSSL_con‐
27       fig() or the more sophisticated functions such as CONF_modules_load()
28       during initialization (that is before starting any threads). By doing
29       this an application does not need to keep track of all configuration
30       options and some new functionality can be supported automatically.
31
32       It is also possible to automatically call OPENSSL_config() when an
33       application calls OPENSSL_add_all_algorithms() by compiling an applica‐
34       tion with the preprocessor symbol OPENSSL_LOAD_CONF #define'd. In this
35       way configuration can be added without source changes.
36
37       The environment variable OPENSSL_CONF can be set to specify the loca‐
38       tion of the configuration file.
39
40       Currently ASN1 OBJECTs and ENGINE configuration can be performed future
41       versions of OpenSSL will add new configuration options.
42
43       There are several reasons why calling the OpenSSL configuration rou‐
44       tines is advisable. For example new ENGINE functionality was added to
45       OpenSSL 0.9.7.  In OpenSSL 0.9.7 control functions can be supported by
46       ENGINEs, this can be used (among other things) to load dynamic ENGINEs
47       from shared libraries (DSOs).  However very few applications currently
48       support the control interface and so very few can load and use dynamic
49       ENGINEs. Equally in future more sophisticated ENGINEs will require cer‐
50       tain control operations to customize them. If an application calls
51       OPENSSL_config() it doesn't need to know or care about ENGINE control
52       operations because they can be performed by editing a configuration
53       file.
54
55       Applications should free up configuration at application closedown by
56       calling CONF_modules_free().
57

RESTRICTIONS

59       The OPENSSL_config() function is designed to be a very simple "call it
60       and forget it" function. As a result its behaviour is somewhat limited.
61       It ignores all errors silently and it can only load from the standard
62       configuration file location for example.
63
64       It is however much better than nothing. Applications which need finer
65       control over their configuration functionality should use the configu‐
66       ration functions such as CONF_load_modules() directly.
67

RETURN VALUES

69       Neither OPENSSL_config() nor OPENSSL_no_config() return a value.
70

SEE ALSO

72       conf(5), CONF_load_modules_file(3), CONF_modules_free(3),CONF_mod‐
73       ules_free(3)
74

HISTORY

76       OPENSSL_config() and OPENSSL_no_config() first appeared in OpenSSL
77       0.9.7
78
79
80
810.9.8b                            2005-06-02                 OPENSSL_config(3)
Impressum