diff options
author | schwarze <> | 2019-06-14 13:41:31 +0000 |
---|---|---|
committer | schwarze <> | 2019-06-14 13:41:31 +0000 |
commit | 1c6dd887ec8f9d6b87ce2f220e839fbe1b78db67 (patch) | |
tree | e256db7268ff96a8a7913497240af58ac3423a15 /src/lib/libcrypto/man/CONF_modules_load_file.3 | |
parent | 5a7670f6ffe1fa2cc36ecf3077067c03cad025ea (diff) | |
download | openbsd-1c6dd887ec8f9d6b87ce2f220e839fbe1b78db67.tar.gz openbsd-1c6dd887ec8f9d6b87ce2f220e839fbe1b78db67.tar.bz2 openbsd-1c6dd887ec8f9d6b87ce2f220e839fbe1b78db67.zip |
Further improve the documentation of library initialization and configuration.
Among other improvements:
* Use a uniform wording at the top of the DECSRIPTION for obsolete pages.
* Better explain how to use a non-standard configuration file.
* Remove obsolete functions from SEE ALSO.
Triggered by some suggestions from tb@.
Tweaks and OK tb@.
Diffstat (limited to 'src/lib/libcrypto/man/CONF_modules_load_file.3')
-rw-r--r-- | src/lib/libcrypto/man/CONF_modules_load_file.3 | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/CONF_modules_load_file.3 b/src/lib/libcrypto/man/CONF_modules_load_file.3 index d0401d520b..972752f7a3 100644 --- a/src/lib/libcrypto/man/CONF_modules_load_file.3 +++ b/src/lib/libcrypto/man/CONF_modules_load_file.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: CONF_modules_load_file.3,v 1.8 2019/03/20 04:02:07 schwarze Exp $ | 1 | .\" $OpenBSD: CONF_modules_load_file.3,v 1.9 2019/06/14 13:41:31 schwarze Exp $ |
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | 2 | .\" 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 was written by Dr. Stephen Henson <steve@openssl.org>. |
@@ -48,7 +48,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 50 | .\" |
51 | .Dd $Mdocdate: March 20 2019 $ | 51 | .Dd $Mdocdate: June 14 2019 $ |
52 | .Dt CONF_MODULES_LOAD_FILE 3 | 52 | .Dt CONF_MODULES_LOAD_FILE 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -95,6 +95,13 @@ is used. | |||
95 | The behaviour can be customized using | 95 | The behaviour can be customized using |
96 | .Fa flags . | 96 | .Fa flags . |
97 | .Pp | 97 | .Pp |
98 | See the | ||
99 | .Sx EXAMPLES | ||
100 | section for additional functions that may need to be called. | ||
101 | Calling configuration functions in the right order for the intended | ||
102 | effect can be tricky because many configuration functions internally | ||
103 | call each other. | ||
104 | .Pp | ||
98 | .Fn CONF_modules_load | 105 | .Fn CONF_modules_load |
99 | is identical to | 106 | is identical to |
100 | .Fn CONF_modules_load_file | 107 | .Fn CONF_modules_load_file |
@@ -180,9 +187,12 @@ if (CONF_modules_load_file(NULL, "myapp", | |||
180 | } | 187 | } |
181 | .Ed | 188 | .Ed |
182 | .Pp | 189 | .Pp |
183 | Load custom configuration file and section, only print warnings on | 190 | Load custom configuration file and section instead of the standard one, |
184 | error, missing configuration file ignored: | 191 | only print warnings on error, missing configuration file ignored: |
185 | .Bd -literal | 192 | .Bd -literal |
193 | OPENSSL_no_config(); | ||
194 | ENGINE_load_builtin_engines(); | ||
195 | OPENSSL_load_builtin_modules(); | ||
186 | if (CONF_modules_load_file("/something/app.cnf", "myapp", | 196 | if (CONF_modules_load_file("/something/app.cnf", "myapp", |
187 | CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) { | 197 | CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) { |
188 | fprintf(stderr, "WARNING: error loading configuration file\en"); | 198 | fprintf(stderr, "WARNING: error loading configuration file\en"); |
@@ -190,6 +200,17 @@ if (CONF_modules_load_file("/something/app.cnf", "myapp", | |||
190 | } | 200 | } |
191 | .Ed | 201 | .Ed |
192 | .Pp | 202 | .Pp |
203 | In the previous example, the call to | ||
204 | .Xr OPENSSL_no_config 3 | ||
205 | is required first to suppress automatic loading | ||
206 | of the standard configuration file, and the calls to | ||
207 | .Xr ENGINE_load_builtin_engines 3 | ||
208 | and | ||
209 | .Xr OPENSSL_load_builtin_modules 3 | ||
210 | are needed so that the configuration of builtin modules and engines | ||
211 | is also loaded in addition to the configuration of | ||
212 | .Qq myapp . | ||
213 | .Pp | ||
193 | Load and parse configuration file manually, custom error handling: | 214 | Load and parse configuration file manually, custom error handling: |
194 | .Bd -literal | 215 | .Bd -literal |
195 | FILE *fp; | 216 | FILE *fp; |
@@ -218,9 +239,10 @@ if (fp == NULL) { | |||
218 | .Ed | 239 | .Ed |
219 | .Sh SEE ALSO | 240 | .Sh SEE ALSO |
220 | .Xr CONF_modules_free 3 , | 241 | .Xr CONF_modules_free 3 , |
242 | .Xr ENGINE_load_builtin_engines 3 , | ||
221 | .Xr ERR 3 , | 243 | .Xr ERR 3 , |
222 | .Xr OPENSSL_config 3 , | 244 | .Xr OPENSSL_config 3 , |
223 | .Xr OPENSSL_init_crypto 3 | 245 | .Xr OPENSSL_load_builtin_modules 3 |
224 | .Sh HISTORY | 246 | .Sh HISTORY |
225 | .Fn CONF_modules_load_file | 247 | .Fn CONF_modules_load_file |
226 | and | 248 | and |