summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2018-03-17 20:18:44 +0000
committerschwarze <>2018-03-17 20:18:44 +0000
commitfdc2ab736d85c8663197b0ef9dbca9e93976c000 (patch)
tree4bb6e548761af12280be75e30d894fe3f2d2fc5c /src
parent1df6e36c9d7eff0320ef36b1b8f08614c168f15f (diff)
downloadopenbsd-fdc2ab736d85c8663197b0ef9dbca9e93976c000.tar.gz
openbsd-fdc2ab736d85c8663197b0ef9dbca9e93976c000.tar.bz2
openbsd-fdc2ab736d85c8663197b0ef9dbca9e93976c000.zip
Clean up now that autoconfiguration is available:
- deprecation notice - say more precisely what OPENSSL_config(3) does - kill the unfounded rumour that the library might inspect environment variables; in fact, only the openssl(1) program inspects $OPENSSL_CONF - garbage collect long, irrelevant ramblings about engines - garbage collect empty RETURN VALUES section - garbage collect CAVEATS section, duplicate information only
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/OPENSSL_config.3133
1 files changed, 55 insertions, 78 deletions
diff --git a/src/lib/libcrypto/man/OPENSSL_config.3 b/src/lib/libcrypto/man/OPENSSL_config.3
index 3aa1944dab..6e2a1ef56f 100644
--- a/src/lib/libcrypto/man/OPENSSL_config.3
+++ b/src/lib/libcrypto/man/OPENSSL_config.3
@@ -1,8 +1,25 @@
1.\" $OpenBSD: OPENSSL_config.3,v 1.7 2018/03/17 18:52:42 schwarze Exp $ 1.\" $OpenBSD: OPENSSL_config.3,v 1.8 2018/03/17 20:18:44 schwarze Exp $
2.\" OpenSSL ab6577a4 May 14 21:07:51 2014 +0100 2.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file is a derived work.
5.\" Copyright (c) 2000, 2004, 2005 The OpenSSL Project. All rights reserved. 5.\" The changes are covered by the following Copyright and license:
6.\"
7.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
8.\"
9.\" Permission to use, copy, modify, and distribute this software for any
10.\" purpose with or without fee is hereby granted, provided that the above
11.\" copyright notice and this permission notice appear in all copies.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20.\"
21.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
22.\" Copyright (c) 2004 The OpenSSL Project. All rights reserved.
6.\" 23.\"
7.\" Redistribution and use in source and binary forms, with or without 24.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions 25.\" modification, are permitted provided that the following conditions
@@ -54,32 +71,50 @@
54.Sh NAME 71.Sh NAME
55.Nm OPENSSL_config , 72.Nm OPENSSL_config ,
56.Nm OPENSSL_no_config 73.Nm OPENSSL_no_config
57.Nd simple OpenSSL configuration functions 74.Nd old style crypto and ssl library initialization
58.Sh SYNOPSIS 75.Sh SYNOPSIS
59.In openssl/conf.h 76.In openssl/conf.h
60.Ft void 77.Ft void
61.Fo OPENSSL_config 78.Fo OPENSSL_config
62.Fa "const char *config_name" 79.Fa "const char *appname"
63.Fc 80.Fc
64.Ft void 81.Ft void
65.Fn OPENSSL_no_config void 82.Fn OPENSSL_no_config void
66.Sh DESCRIPTION 83.Sh DESCRIPTION
84These functions have been deprecated since OpenSSL 1.1.0.
85It is recommended to use
86.Xr CONF_modules_load_file 3
87instead of
67.Fn OPENSSL_config 88.Fn OPENSSL_config
68configures OpenSSL using the standard 89or
69.Xr openssl.cnf 5 90.Xr OPENSSL_init_crypto 3
70configuration file name using 91with
71.Fa config_name . 92.Dv OPENSSL_INIT_NO_LOAD_CONFIG
93instead of
94.Fn OPENSSL_no_config .
95Except to disable the standard configuration file, application programs
96do not need to call any library initialization function at all because
97LibreSSL does all the required initialization automatically, and so does
98OpenSSL 1.1.0 and later.
99.Pp
100.Fn OPENSSL_config
101initializes the crypto library, in particular calling
102.Xr OPENSSL_init_crypto 3
103and
104.Xr CONF_modules_load_file 3
105with the standard configuration file and the given
106.Fa appname .
72If 107If
73.Fa config_name 108.Fa appname
74is 109is
75.Dv NULL 110.Dv NULL ,
76then the default name 111then the default name
77.Sy openssl_conf 112.Sy openssl_conf
78will be used. 113is used.
79Any errors are ignored. 114Any errors are ignored.
80Further calls to 115Further calls to
81.Fn OPENSSL_config 116.Fn OPENSSL_config
82will have no effect. 117have no effect.
83.Pp 118.Pp
84.Fn OPENSSL_no_config 119.Fn OPENSSL_no_config
85disables configuration. 120disables configuration.
@@ -87,58 +122,16 @@ If called before
87.Fn OPENSSL_config , 122.Fn OPENSSL_config ,
88no configuration takes place. 123no configuration takes place.
89.Pp 124.Pp
90It is 125If an application is compiled with the preprocessor symbol
91.Sy strongly
92recommended that
93.Sy all
94new applications call
95.Fn OPENSSL_config
96or the more sophisticated functions such as
97.Xr CONF_modules_load 3
98during initialization (that is before starting any threads).
99By doing this, an application does not need to keep track of all
100configuration options and some new functionality can be supported
101automatically.
102.Pp
103It is also possible to automatically call
104.Fn OPENSSL_config
105when an application calls
106.Xr OpenSSL_add_all_algorithms 3
107by compiling an application with the preprocessor symbol
108.Dv OPENSSL_LOAD_CONF 126.Dv OPENSSL_LOAD_CONF
109#define'd. 127#define'd,
110In this way configuration can be added without source changes. 128.Xr OpenSSL_add_all_algorithms 3
111.Pp 129automatically calls
112The environment variable 130.Fn OPENSSL_config .
113.Ev OPENSSL_CONF
114can be set to specify the location of the configuration file.
115.Pp
116Currently ASN.1 OBJECT and ENGINE configuration can be performed.
117.Pp
118There are several reasons why calling the OpenSSL configuration routines
119is advisable.
120For example new ENGINE functionality was added to OpenSSL 0.9.7.
121In OpenSSL 0.9.7 control functions can be supported by ENGINEs which can be
122used (among other things) to load dynamic ENGINEs from shared libraries
123(DSOs).
124However very few applications currently support the control interface
125and so very few can load and use dynamic ENGINEs.
126Equally in future more sophisticated ENGINEs will require certain
127control operations to customize them.
128If an application calls
129.Fn OPENSSL_config
130it doesn't need to know or care about ENGINE control operations because
131they can be performed by editing a configuration file.
132.Pp 131.Pp
133Applications should free up configuration at application closedown by 132Applications should free up configuration at application closedown by
134calling 133calling
135.Xr CONF_modules_free 3 . 134.Xr CONF_modules_free 3 .
136.Sh RETURN VALUES
137Neither
138.Fn OPENSSL_config
139nor
140.Fn OPENSSL_no_config
141return a value.
142.Sh FILES 135.Sh FILES
143.Bl -tag -width /etc/ssl/openssl.cnf -compact 136.Bl -tag -width /etc/ssl/openssl.cnf -compact
144.It Pa /etc/ssl/openssl.cnf 137.It Pa /etc/ssl/openssl.cnf
@@ -146,7 +139,7 @@ standard configuration file
146.El 139.El
147.Sh SEE ALSO 140.Sh SEE ALSO
148.Xr CONF_modules_free 3 , 141.Xr CONF_modules_free 3 ,
149.Xr CONF_modules_load 3 , 142.Xr CONF_modules_load_file 3 ,
150.Xr OPENSSL_init_crypto 3 , 143.Xr OPENSSL_init_crypto 3 ,
151.Xr openssl.cnf 5 144.Xr openssl.cnf 5
152.Sh HISTORY 145.Sh HISTORY
@@ -154,19 +147,3 @@ standard configuration file
154and 147and
155.Fn OPENSSL_no_config 148.Fn OPENSSL_no_config
156first appeared in OpenSSL 0.9.7. 149first appeared in OpenSSL 0.9.7.
157.Sh CAVEATS
158The
159.Fn OPENSSL_config
160function is designed to be a very simple "call it and forget it"
161function.
162As a result its behaviour is somewhat limited.
163It ignores all errors silently and it can only load from the standard
164configuration file location for example.
165.Pp
166It is however
167.Sy much
168better than nothing.
169Applications which need finer control over their configuration
170functionality should use the configuration functions such as
171.Xr CONF_modules_load 3
172directly.