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