summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/CONF_modules_load_file.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/CONF_modules_load_file.3')
-rw-r--r--src/lib/libcrypto/man/CONF_modules_load_file.332
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.
95The behaviour can be customized using 95The behaviour can be customized using
96.Fa flags . 96.Fa flags .
97.Pp 97.Pp
98See the
99.Sx EXAMPLES
100section for additional functions that may need to be called.
101Calling configuration functions in the right order for the intended
102effect can be tricky because many configuration functions internally
103call each other.
104.Pp
98.Fn CONF_modules_load 105.Fn CONF_modules_load
99is identical to 106is 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
183Load custom configuration file and section, only print warnings on 190Load custom configuration file and section instead of the standard one,
184error, missing configuration file ignored: 191only print warnings on error, missing configuration file ignored:
185.Bd -literal 192.Bd -literal
193OPENSSL_no_config();
194ENGINE_load_builtin_engines();
195OPENSSL_load_builtin_modules();
186if (CONF_modules_load_file("/something/app.cnf", "myapp", 196if (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
203In the previous example, the call to
204.Xr OPENSSL_no_config 3
205is required first to suppress automatic loading
206of the standard configuration file, and the calls to
207.Xr ENGINE_load_builtin_engines 3
208and
209.Xr OPENSSL_load_builtin_modules 3
210are needed so that the configuration of builtin modules and engines
211is also loaded in addition to the configuration of
212.Qq myapp .
213.Pp
193Load and parse configuration file manually, custom error handling: 214Load and parse configuration file manually, custom error handling:
194.Bd -literal 215.Bd -literal
195FILE *fp; 216FILE *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
226and 248and