diff options
Diffstat (limited to 'src/lib/libcrypto/man/OPENSSL_config.3')
| -rw-r--r-- | src/lib/libcrypto/man/OPENSSL_config.3 | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/OPENSSL_config.3 b/src/lib/libcrypto/man/OPENSSL_config.3 new file mode 100644 index 0000000000..a944ba7b4e --- /dev/null +++ b/src/lib/libcrypto/man/OPENSSL_config.3 | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | .Dd $Mdocdate: November 3 2016 $ | ||
| 2 | .Dt OPENSSL_CONFIG 3 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm OPENSSL_config , | ||
| 6 | .Nm OPENSSL_no_config | ||
| 7 | .Nd simple OpenSSL configuration functions | ||
| 8 | .Sh SYNOPSIS | ||
| 9 | .In openssl/conf.h | ||
| 10 | .Ft void | ||
| 11 | .Fo OPENSSL_config | ||
| 12 | .Fa "const char *config_name" | ||
| 13 | .Fc | ||
| 14 | .Ft void | ||
| 15 | .Fn OPENSSL_no_config void | ||
| 16 | .Sh DESCRIPTION | ||
| 17 | .Fn OPENSSL_config | ||
| 18 | configures OpenSSL using the standard | ||
| 19 | .Pa openssl.cnf | ||
| 20 | configuration file name using | ||
| 21 | .Fa config_name . | ||
| 22 | If | ||
| 23 | .Fa config_name | ||
| 24 | is | ||
| 25 | .Dv NULL | ||
| 26 | then the default name | ||
| 27 | .Sy openssl_conf | ||
| 28 | will be used. | ||
| 29 | Any errors are ignored. | ||
| 30 | Further calls to | ||
| 31 | .Fn OPENSSL_config | ||
| 32 | will have no effect. | ||
| 33 | .Pp | ||
| 34 | .Fn OPENSSL_no_config | ||
| 35 | disables configuration. | ||
| 36 | If called before | ||
| 37 | .Fn OPENSSL_config , | ||
| 38 | no configuration takes place. | ||
| 39 | .Pp | ||
| 40 | It is | ||
| 41 | .Sy strongly | ||
| 42 | recommended that | ||
| 43 | .Sy all | ||
| 44 | new applications call | ||
| 45 | .Fn OPENSSL_config | ||
| 46 | or the more sophisticated functions such as | ||
| 47 | .Xr CONF_modules_load 3 | ||
| 48 | during initialization (that is before starting any threads). | ||
| 49 | By doing this, an application does not need to keep track of all | ||
| 50 | configuration options and some new functionality can be supported | ||
| 51 | automatically. | ||
| 52 | .Pp | ||
| 53 | It is also possible to automatically call | ||
| 54 | .Fn OPENSSL_config | ||
| 55 | when an application calls | ||
| 56 | .Xr OPENSSL_add_all_algorithms 3 | ||
| 57 | by compiling an application with the preprocessor symbol | ||
| 58 | .Dv OPENSSL_LOAD_CONF | ||
| 59 | #define'd. | ||
| 60 | In this way configuration can be added without source changes. | ||
| 61 | .Pp | ||
| 62 | The environment variable | ||
| 63 | .Ev OPENSSL_CONF | ||
| 64 | can be set to specify the location of the configuration file. | ||
| 65 | .Pp | ||
| 66 | Currently ASN1 OBJECT and ENGINE configuration can be performed. | ||
| 67 | .Pp | ||
| 68 | There are several reasons why calling the OpenSSL configuration routines | ||
| 69 | is advisable. | ||
| 70 | For example new ENGINE functionality was added to OpenSSL 0.9.7. | ||
| 71 | In OpenSSL 0.9.7 control functions can be supported by ENGINEs, this can be | ||
| 72 | used (among other things) to load dynamic ENGINEs from shared libraries | ||
| 73 | (DSOs). | ||
| 74 | However very few applications currently support the control interface | ||
| 75 | and so very few can load and use dynamic ENGINEs. | ||
| 76 | Equally in future more sophisticated ENGINEs will require certain | ||
| 77 | control operations to customize them. | ||
| 78 | If an application calls | ||
| 79 | .Fn OPENSSL_config | ||
| 80 | it doesn't need to know or care about ENGINE control operations because | ||
| 81 | they can be performed by editing a configuration file. | ||
| 82 | .Pp | ||
| 83 | Applications should free up configuration at application closedown by | ||
| 84 | calling | ||
| 85 | .Xr CONF_modules_free 3 . | ||
| 86 | .Sh RETURN VALUES | ||
| 87 | Neither | ||
| 88 | .Fn OPENSSL_config | ||
| 89 | nor | ||
| 90 | .Fn OPENSSL_no_config | ||
| 91 | return a value. | ||
| 92 | .Sh SEE ALSO | ||
| 93 | .Xr CONF_modules_free 3 , | ||
| 94 | .Xr CONF_modules_load 3 | ||
| 95 | .Sh HISTORY | ||
| 96 | .Fn OPENSSL_config | ||
| 97 | and | ||
| 98 | .Fn OPENSSL_no_config | ||
| 99 | first appeared in OpenSSL 0.9.7. | ||
| 100 | .Sh CAVEATS | ||
| 101 | The | ||
| 102 | .Fn OPENSSL_config | ||
| 103 | function is designed to be a very simple "call it and forget it" | ||
| 104 | function. | ||
| 105 | As a result its behaviour is somewhat limited. | ||
| 106 | It ignores all errors silently and it can only load from the standard | ||
| 107 | configuration file location for example. | ||
| 108 | .Pp | ||
| 109 | It is however | ||
| 110 | .Sy much | ||
| 111 | better than nothing. | ||
| 112 | Applications which need finer control over their configuration | ||
| 113 | functionality should use the configuration functions such as | ||
| 114 | .Xr CONF_load_modules 3 | ||
| 115 | directly. | ||
