summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/OPENSSL_config.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/OPENSSL_config.3')
-rw-r--r--src/lib/libcrypto/man/OPENSSL_config.3115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/OPENSSL_config.3 b/src/lib/libcrypto/man/OPENSSL_config.3
new file mode 100644
index 0000000000..a944ba7b4e
--- /dev/null
+++ b/src/lib/libcrypto/man/OPENSSL_config.3
@@ -0,0 +1,115 @@
1.Dd $Mdocdate: November 3 2016 $
2.Dt OPENSSL_CONFIG 3
3.Os
4.Sh NAME
5.Nm OPENSSL_config ,
6.Nm OPENSSL_no_config
7.Nd simple OpenSSL configuration functions
8.Sh SYNOPSIS
9.In openssl/conf.h
10.Ft void
11.Fo OPENSSL_config
12.Fa "const char *config_name"
13.Fc
14.Ft void
15.Fn OPENSSL_no_config void
16.Sh DESCRIPTION
17.Fn OPENSSL_config
18configures OpenSSL using the standard
19.Pa openssl.cnf
20configuration file name using
21.Fa config_name .
22If
23.Fa config_name
24is
25.Dv NULL
26then the default name
27.Sy openssl_conf
28will be used.
29Any errors are ignored.
30Further calls to
31.Fn OPENSSL_config
32will have no effect.
33.Pp
34.Fn OPENSSL_no_config
35disables configuration.
36If called before
37.Fn OPENSSL_config ,
38no configuration takes place.
39.Pp
40It is
41.Sy strongly
42recommended that
43.Sy all
44new applications call
45.Fn OPENSSL_config
46or the more sophisticated functions such as
47.Xr CONF_modules_load 3
48during initialization (that is before starting any threads).
49By doing this, an application does not need to keep track of all
50configuration options and some new functionality can be supported
51automatically.
52.Pp
53It is also possible to automatically call
54.Fn OPENSSL_config
55when an application calls
56.Xr OPENSSL_add_all_algorithms 3
57by compiling an application with the preprocessor symbol
58.Dv OPENSSL_LOAD_CONF
59#define'd.
60In this way configuration can be added without source changes.
61.Pp
62The environment variable
63.Ev OPENSSL_CONF
64can be set to specify the location of the configuration file.
65.Pp
66Currently ASN1 OBJECT and ENGINE configuration can be performed.
67.Pp
68There are several reasons why calling the OpenSSL configuration routines
69is advisable.
70For example new ENGINE functionality was added to OpenSSL 0.9.7.
71In OpenSSL 0.9.7 control functions can be supported by ENGINEs, this can be
72used (among other things) to load dynamic ENGINEs from shared libraries
73(DSOs).
74However very few applications currently support the control interface
75and so very few can load and use dynamic ENGINEs.
76Equally in future more sophisticated ENGINEs will require certain
77control operations to customize them.
78If an application calls
79.Fn OPENSSL_config
80it doesn't need to know or care about ENGINE control operations because
81they can be performed by editing a configuration file.
82.Pp
83Applications should free up configuration at application closedown by
84calling
85.Xr CONF_modules_free 3 .
86.Sh RETURN VALUES
87Neither
88.Fn OPENSSL_config
89nor
90.Fn OPENSSL_no_config
91return a value.
92.Sh SEE ALSO
93.Xr CONF_modules_free 3 ,
94.Xr CONF_modules_load 3
95.Sh HISTORY
96.Fn OPENSSL_config
97and
98.Fn OPENSSL_no_config
99first appeared in OpenSSL 0.9.7.
100.Sh CAVEATS
101The
102.Fn OPENSSL_config
103function is designed to be a very simple "call it and forget it"
104function.
105As a result its behaviour is somewhat limited.
106It ignores all errors silently and it can only load from the standard
107configuration file location for example.
108.Pp
109It is however
110.Sy much
111better than nothing.
112Applications which need finer control over their configuration
113functionality should use the configuration functions such as
114.Xr CONF_load_modules 3
115directly.