xref: /openssl/doc/man3/OPENSSL_config.pod (revision 3dbf8243)
1=pod
2
3=head1 NAME
4
5OPENSSL_config, OPENSSL_no_config - simple OpenSSL configuration functions
6
7=head1 SYNOPSIS
8
9 #include <openssl/conf.h>
10
11The following functions have been deprecated since OpenSSL 1.1.0, and can be
12hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
13see L<openssl_user_macros(7)>:
14
15 void OPENSSL_config(const char *appname);
16 void OPENSSL_no_config(void);
17
18=head1 DESCRIPTION
19
20OPENSSL_config() configures OpenSSL using the standard B<openssl.cnf> and
21reads from the application section B<appname>. If B<appname> is NULL then
22the default section, B<openssl_conf>, will be used.
23Errors are silently ignored.
24Multiple calls have no effect.
25
26OPENSSL_no_config() disables configuration. If called before OPENSSL_config()
27no configuration takes place.
28
29If the application is built with B<OPENSSL_LOAD_CONF> defined, then a
30call to OpenSSL_add_all_algorithms() will implicitly call OPENSSL_config()
31first.
32
33=head1 NOTES
34
35The OPENSSL_config() function is designed to be a very simple "call it and
36forget it" function.
37It is however B<much> better than nothing. Applications which need finer
38control over their configuration functionality should use the configuration
39functions such as CONF_modules_load() directly. This function is deprecated
40and its use should be avoided.
41Applications should instead call CONF_modules_load() during
42initialization (that is before starting any threads).
43
44There are several reasons why calling the OpenSSL configuration routines is
45advisable. For example, to load dynamic ENGINEs from shared libraries (DSOs).
46However, very few applications currently support the control interface and so
47very few can load and use dynamic ENGINEs. Equally in future more sophisticated
48ENGINEs will require certain control operations to customize them. If an
49application calls OPENSSL_config() it doesn't need to know or care about
50ENGINE control operations because they can be performed by editing a
51configuration file.
52
53=head1 ENVIRONMENT
54
55=over 4
56
57=item B<OPENSSL_CONF>
58
59The path to the config file.
60Ignored in set-user-ID and set-group-ID programs.
61
62=back
63
64=head1 RETURN VALUES
65
66Neither OPENSSL_config() nor OPENSSL_no_config() return a value.
67
68=head1 SEE ALSO
69
70L<config(5)>,
71L<CONF_modules_load_file(3)>
72
73=head1 HISTORY
74
75The OPENSSL_no_config() and OPENSSL_config() functions were
76deprecated in OpenSSL 1.1.0 by OPENSSL_init_crypto().
77
78=head1 COPYRIGHT
79
80Copyright 2004-2020 The OpenSSL Project Authors. All Rights Reserved.
81
82Licensed under the Apache License 2.0 (the "License").  You may not use
83this file except in compliance with the License.  You can obtain a copy
84in the file LICENSE in the source distribution or at
85L<https://www.openssl.org/source/license.html>.
86
87=cut
88