diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/ASN1_generate_nconf.3 | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/CONF_modules_load_file.3 | 19 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/OPENSSL_config.3 | 14 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/openssl.cnf.5 | 496 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/x509v3.cnf.5 | 731 | 
6 files changed, 1259 insertions, 14 deletions
| diff --git a/src/lib/libcrypto/man/ASN1_generate_nconf.3 b/src/lib/libcrypto/man/ASN1_generate_nconf.3 index 2d5d8c7a73..bcf55d724b 100644 --- a/src/lib/libcrypto/man/ASN1_generate_nconf.3 +++ b/src/lib/libcrypto/man/ASN1_generate_nconf.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: ASN1_generate_nconf.3,v 1.7 2016/11/10 13:06:24 schwarze Exp $ | 1 | .\" $OpenBSD: ASN1_generate_nconf.3,v 1.8 2016/12/11 18:06:09 schwarze Exp $ | 
| 2 | .\" OpenSSL 05ea606a Fri May 20 20:52:46 2016 -0400 | 2 | .\" OpenSSL 05ea606a Fri May 20 20:52:46 2016 -0400 | 
| 3 | .\" | 3 | .\" | 
| 4 | .\" This file was written by Dr. Stephen Henson. | 4 | .\" This file was written by Dr. Stephen Henson. | 
| @@ -49,7 +49,7 @@ | |||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 51 | .\" | 51 | .\" | 
| 52 | .Dd $Mdocdate: November 10 2016 $ | 52 | .Dd $Mdocdate: December 11 2016 $ | 
| 53 | .Dt ASN1_GENERATE_NCONF 3 | 53 | .Dt ASN1_GENERATE_NCONF 3 | 
| 54 | .Os | 54 | .Os | 
| 55 | .Sh NAME | 55 | .Sh NAME | 
| @@ -374,7 +374,8 @@ D4D2C6D000430DEC66ABF47829E74B8C5108623A1C0EE8BE217B3AD8D36D5EB4FCA1D9 | |||
| 374 | e=INTEGER:0x010001 | 374 | e=INTEGER:0x010001 | 
| 375 | .Ed | 375 | .Ed | 
| 376 | .Sh SEE ALSO | 376 | .Sh SEE ALSO | 
| 377 | .Xr ERR_get_error 3 | 377 | .Xr ERR_get_error 3 , | 
| 378 | .Xr x509v3.cnf 5 | ||
| 378 | .Sh HISTORY | 379 | .Sh HISTORY | 
| 379 | .Fn ASN1_generate_nconf | 380 | .Fn ASN1_generate_nconf | 
| 380 | and | 381 | and | 
| diff --git a/src/lib/libcrypto/man/CONF_modules_load_file.3 b/src/lib/libcrypto/man/CONF_modules_load_file.3 index 0e594a1544..620787b4f1 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.4 2016/11/20 19:47:59 schwarze Exp $ | 1 | .\" $OpenBSD: CONF_modules_load_file.3,v 1.5 2016/12/11 18:06:09 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: November 20 2016 $ | 51 | .Dd $Mdocdate: December 11 2016 $ | 
| 52 | .Dt CONF_MODULES_LOAD_FILE 3 | 52 | .Dt CONF_MODULES_LOAD_FILE 3 | 
| 53 | .Os | 53 | .Os | 
| 54 | .Sh NAME | 54 | .Sh NAME | 
| @@ -72,15 +72,19 @@ | |||
| 72 | .Sh DESCRIPTION | 72 | .Sh DESCRIPTION | 
| 73 | The function | 73 | The function | 
| 74 | .Fn CONF_modules_load_file | 74 | .Fn CONF_modules_load_file | 
| 75 | configures OpenSSL using file | 75 | configures OpenSSL using the file | 
| 76 | .Fa filename | 76 | .Fa filename | 
| 77 | and application name | 77 | in | 
| 78 | .Xr openssl.cnf 5 | ||
| 79 | format and the application name | ||
| 78 | .Fa appname . | 80 | .Fa appname . | 
| 79 | If | 81 | If | 
| 80 | .Fa filename | 82 | .Fa filename | 
| 81 | is | 83 | is | 
| 82 | .Dv NULL , | 84 | .Dv NULL , | 
| 83 | the standard OpenSSL configuration file is used. | 85 | the standard OpenSSL configuration file | 
| 86 | .Pa /etc/ssl/openssl.cnf | ||
| 87 | is used. | ||
| 84 | If | 88 | If | 
| 85 | .Fa appname | 89 | .Fa appname | 
| 86 | is | 90 | is | 
| @@ -149,6 +153,11 @@ These functions return 1 for success and zero or a negative value for | |||
| 149 | failure. | 153 | failure. | 
| 150 | If module errors are not ignored, the return code will reflect the return | 154 | If module errors are not ignored, the return code will reflect the return | 
| 151 | value of the failing module (this will always be zero or negative). | 155 | value of the failing module (this will always be zero or negative). | 
| 156 | .Sh FILES | ||
| 157 | .Bl -tag -width /etc/ssl/openssl.cnf -compact | ||
| 158 | .It Pa /etc/ssl/openssl.cnf | ||
| 159 | standard configuration file | ||
| 160 | .El | ||
| 152 | .Sh EXAMPLES | 161 | .Sh EXAMPLES | 
| 153 | Load a configuration file and print out any errors and exit (missing | 162 | Load a configuration file and print out any errors and exit (missing | 
| 154 | file considered fatal): | 163 | file considered fatal): | 
| diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 4d23082d1f..89533851fb 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.73 2016/12/11 14:22:43 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.74 2016/12/11 18:06:09 schwarze Exp $ | 
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> | 
| 4 | 4 | ||
| @@ -218,7 +218,9 @@ MAN= \ | |||
| 218 | i2d_PKCS7_bio_stream.3 \ | 218 | i2d_PKCS7_bio_stream.3 \ | 
| 219 | lh_new.3 \ | 219 | lh_new.3 \ | 
| 220 | lh_stats.3 \ | 220 | lh_stats.3 \ | 
| 221 | x509.3 | 221 | x509.3 \ | 
| 222 | openssl.cnf.5 \ | ||
| 223 | x509v3.cnf.5 | ||
| 222 | 224 | ||
| 223 | all clean cleandir depend includes obj tags: | 225 | all clean cleandir depend includes obj tags: | 
| 224 | 226 | ||
| diff --git a/src/lib/libcrypto/man/OPENSSL_config.3 b/src/lib/libcrypto/man/OPENSSL_config.3 index e6968171c4..bf42b72fd2 100644 --- a/src/lib/libcrypto/man/OPENSSL_config.3 +++ b/src/lib/libcrypto/man/OPENSSL_config.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: OPENSSL_config.3,v 1.4 2016/11/28 14:52:20 schwarze Exp $ | 1 | .\" $OpenBSD: OPENSSL_config.3,v 1.5 2016/12/11 18:06:09 schwarze Exp $ | 
| 2 | .\" OpenSSL ab6577a4 May 14 21:07:51 2014 +0100 | 2 | .\" OpenSSL ab6577a4 May 14 21:07:51 2014 +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: November 28 2016 $ | 51 | .Dd $Mdocdate: December 11 2016 $ | 
| 52 | .Dt OPENSSL_CONFIG 3 | 52 | .Dt OPENSSL_CONFIG 3 | 
| 53 | .Os | 53 | .Os | 
| 54 | .Sh NAME | 54 | .Sh NAME | 
| @@ -66,7 +66,7 @@ | |||
| 66 | .Sh DESCRIPTION | 66 | .Sh DESCRIPTION | 
| 67 | .Fn OPENSSL_config | 67 | .Fn OPENSSL_config | 
| 68 | configures OpenSSL using the standard | 68 | configures OpenSSL using the standard | 
| 69 | .Pa openssl.cnf | 69 | .Xr openssl.cnf 5 | 
| 70 | configuration file name using | 70 | configuration file name using | 
| 71 | .Fa config_name . | 71 | .Fa config_name . | 
| 72 | If | 72 | If | 
| @@ -139,9 +139,15 @@ Neither | |||
| 139 | nor | 139 | nor | 
| 140 | .Fn OPENSSL_no_config | 140 | .Fn OPENSSL_no_config | 
| 141 | return a value. | 141 | return a value. | 
| 142 | .Sh FILES | ||
| 143 | .Bl -tag -width /etc/ssl/openssl.cnf -compact | ||
| 144 | .It Pa /etc/ssl/openssl.cnf | ||
| 145 | standard configuration file | ||
| 146 | .El | ||
| 142 | .Sh SEE ALSO | 147 | .Sh SEE ALSO | 
| 143 | .Xr CONF_modules_free 3 , | 148 | .Xr CONF_modules_free 3 , | 
| 144 | .Xr CONF_modules_load 3 | 149 | .Xr CONF_modules_load 3 , | 
| 150 | .Xr openssl.cnf 5 | ||
| 145 | .Sh HISTORY | 151 | .Sh HISTORY | 
| 146 | .Fn OPENSSL_config | 152 | .Fn OPENSSL_config | 
| 147 | and | 153 | and | 
| diff --git a/src/lib/libcrypto/man/openssl.cnf.5 b/src/lib/libcrypto/man/openssl.cnf.5 new file mode 100644 index 0000000000..2826b779ba --- /dev/null +++ b/src/lib/libcrypto/man/openssl.cnf.5 | |||
| @@ -0,0 +1,496 @@ | |||
| 1 | .\" $OpenBSD: openssl.cnf.5,v 1.1 2016/12/11 18:06:09 schwarze Exp $ | ||
| 2 | .\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | ||
| 3 | .\" | ||
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
| 5 | .\" Copyright (c) 1999, 2000, 2004, 2013, 2015, 2016 The OpenSSL Project. | ||
| 6 | .\" All rights reserved. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" | ||
| 12 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 13 | .\" notice, this list of conditions and the following disclaimer. | ||
| 14 | .\" | ||
| 15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | .\" notice, this list of conditions and the following disclaimer in | ||
| 17 | .\" the documentation and/or other materials provided with the | ||
| 18 | .\" distribution. | ||
| 19 | .\" | ||
| 20 | .\" 3. All advertising materials mentioning features or use of this | ||
| 21 | .\" software must display the following acknowledgment: | ||
| 22 | .\" "This product includes software developed by the OpenSSL Project | ||
| 23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 24 | .\" | ||
| 25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | .\" endorse or promote products derived from this software without | ||
| 27 | .\" prior written permission. For written permission, please contact | ||
| 28 | .\" openssl-core@openssl.org. | ||
| 29 | .\" | ||
| 30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 32 | .\" permission of the OpenSSL Project. | ||
| 33 | .\" | ||
| 34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | .\" acknowledgment: | ||
| 36 | .\" "This product includes software developed by the OpenSSL Project | ||
| 37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 38 | .\" | ||
| 39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | .\" | ||
| 52 | .Dd $Mdocdate: December 11 2016 $ | ||
| 53 | .Dt OPENSSL.CNF 5 | ||
| 54 | .Os | ||
| 55 | .Sh NAME | ||
| 56 | .Nm openssl.cnf | ||
| 57 | .Nd OpenSSL configuration files | ||
| 58 | .Sh DESCRIPTION | ||
| 59 | The OpenSSL CONF library can be used to read configuration files, see | ||
| 60 | .Xr CONF_modules_load_file 3 . | ||
| 61 | It is used for the OpenSSL master configuration file | ||
| 62 | .Pa /etc/ssl/openssl.cnf | ||
| 63 | and in a few other places like | ||
| 64 | .Sy SPKAC | ||
| 65 | files and certificate extension files for the | ||
| 66 | .Xr openssl 1 | ||
| 67 | .Cm x509 | ||
| 68 | utility. | ||
| 69 | OpenSSL applications can also use the CONF library for their own | ||
| 70 | purposes. | ||
| 71 | .Pp | ||
| 72 | A configuration file is divided into a number of sections. | ||
| 73 | Each section starts with a line | ||
| 74 | .Bq Ar section_name | ||
| 75 | and ends when a new section is started or the end of the file is reached. | ||
| 76 | A section name can consist of alphanumeric characters and underscores. | ||
| 77 | .Pp | ||
| 78 | The first section of a configuration file is special and is referred to | ||
| 79 | as the | ||
| 80 | .Dq default section . | ||
| 81 | It is usually unnamed and extends from the start of file to the | ||
| 82 | first named section. | ||
| 83 | When a name is being looked up, it is first looked up in a named | ||
| 84 | section (if any) and then in the default section. | ||
| 85 | .Pp | ||
| 86 | The environment is mapped onto a section called | ||
| 87 | .Ic ENV . | ||
| 88 | .Pp | ||
| 89 | Comments can be included by preceding them with the | ||
| 90 | .Ql # | ||
| 91 | character. | ||
| 92 | .Pp | ||
| 93 | Each section in a configuration file consists of a number of name and | ||
| 94 | value pairs of the form | ||
| 95 | .Ar name Ns = Ns Ar value . | ||
| 96 | .Pp | ||
| 97 | The | ||
| 98 | .Ar name | ||
| 99 | string can contain any alphanumeric characters as well as a few | ||
| 100 | punctuation symbols such as | ||
| 101 | .Ql \&. | ||
| 102 | .Ql \&, | ||
| 103 | .Ql \&; | ||
| 104 | and | ||
| 105 | .Ql _ . | ||
| 106 | .Pp | ||
| 107 | The | ||
| 108 | .Ar value | ||
| 109 | string consists of the string following the | ||
| 110 | .Ql = | ||
| 111 | character until the end of the line with any leading and trailing | ||
| 112 | whitespace removed. | ||
| 113 | .Pp | ||
| 114 | The value string undergoes variable expansion. | ||
| 115 | This can be done by including substrings of the form | ||
| 116 | .Pf $ Ar name | ||
| 117 | or | ||
| 118 | .Pf $ Brq Ar name : | ||
| 119 | this will substitute the value of the named variable in the current | ||
| 120 | section. | ||
| 121 | It is also possible to substitute a value from another section using the | ||
| 122 | syntax | ||
| 123 | .Pf $ Ar section Ns :: Ns Ar name | ||
| 124 | or | ||
| 125 | .Pf $ Brq Ar section Ns :: Ns Ar name . | ||
| 126 | By using the form | ||
| 127 | .Pf $ Ic ENV Ns :: Ns Ar name , | ||
| 128 | environment variables can be substituted. | ||
| 129 | It is also possible to assign values to environment variables by using | ||
| 130 | the name | ||
| 131 | .Ic ENV Ns :: Ns Ar name . | ||
| 132 | This will work if the program looks up environment variables using | ||
| 133 | the CONF library instead of calling | ||
| 134 | .Xr getenv 3 | ||
| 135 | directly. | ||
| 136 | .Pp | ||
| 137 | It is possible to escape certain characters by using any kind of quote | ||
| 138 | or the | ||
| 139 | .Ql \e | ||
| 140 | character. | ||
| 141 | By making the last character of a line a | ||
| 142 | .Ql \e , | ||
| 143 | a | ||
| 144 | .Ar value | ||
| 145 | string can be spread across multiple lines. | ||
| 146 | In addition the sequences | ||
| 147 | .Ql \en , | ||
| 148 | .Ql \er , | ||
| 149 | .Ql \eb , | ||
| 150 | and | ||
| 151 | .Ql \et | ||
| 152 | are recognized. | ||
| 153 | .Sh OPENSSL LIBRARY CONFIGURATION | ||
| 154 | Applications can automatically configure certain aspects of OpenSSL | ||
| 155 | using the master OpenSSL configuration file, or optionally an | ||
| 156 | alternative configuration file. | ||
| 157 | The | ||
| 158 | .Xr openssl 1 | ||
| 159 | utility includes this functionality: any sub command uses the master | ||
| 160 | OpenSSL configuration file unless an option is used in the sub command | ||
| 161 | to use an alternative configuration file. | ||
| 162 | .Pp | ||
| 163 | To enable library configuration, the default section needs to contain | ||
| 164 | an appropriate line which points to the main configuration section. | ||
| 165 | The default name is | ||
| 166 | .Ic openssl_conf | ||
| 167 | which is used by the | ||
| 168 | .Xr openssl 1 | ||
| 169 | utility. | ||
| 170 | Other applications may use an alternative name such as | ||
| 171 | .Sy myapplicaton_conf . | ||
| 172 | .Pp | ||
| 173 | The configuration section should consist of a set of name value pairs | ||
| 174 | which contain specific module configuration information. | ||
| 175 | The | ||
| 176 | .Ar name | ||
| 177 | represents the name of the configuration module. | ||
| 178 | The meaning of the | ||
| 179 | .Ar value | ||
| 180 | is module specific: it may, for example, represent a further | ||
| 181 | configuration section containing configuration module specific | ||
| 182 | information. | ||
| 183 | For example: | ||
| 184 | .Bd -literal -offset indent | ||
| 185 | openssl_conf = openssl_init | ||
| 186 | |||
| 187 | [openssl_init] | ||
| 188 | oid_section = new_oids | ||
| 189 | engines = engine_section | ||
| 190 | |||
| 191 | [new_oids] | ||
| 192 | \&... new oids here ... | ||
| 193 | |||
| 194 | [engine_section] | ||
| 195 | \&... engine stuff here ... | ||
| 196 | .Ed | ||
| 197 | .Pp | ||
| 198 | The features of each configuration module are described below. | ||
| 199 | .Ss ASN1 Object Configuration Module | ||
| 200 | This module has the name | ||
| 201 | .Ic oid_section . | ||
| 202 | The value of this variable points to a section containing name value | ||
| 203 | pairs of OIDs: the name is the OID short and long name, the value is the | ||
| 204 | numerical form of the OID. | ||
| 205 | Although some of the | ||
| 206 | .Xr openssl 1 | ||
| 207 | utility subcommands already have their own ASN1 OBJECT section | ||
| 208 | functionality, not all do. | ||
| 209 | By using the ASN1 OBJECT configuration module, all the | ||
| 210 | .Xr openssl 1 | ||
| 211 | utility subcommands can see the new objects as well as any compliant | ||
| 212 | applications. | ||
| 213 | For example: | ||
| 214 | .Bd -literal -offset indent | ||
| 215 | [new_oids] | ||
| 216 | some_new_oid = 1.2.3.4 | ||
| 217 | some_other_oid = 1.2.3.5 | ||
| 218 | .Ed | ||
| 219 | .Pp | ||
| 220 | It is also possible to set the value to the long name followed by a | ||
| 221 | comma and the numerical OID form. | ||
| 222 | For example: | ||
| 223 | .Pp | ||
| 224 | .Dl shortName = some object long name, 1.2.3.4 | ||
| 225 | .Ss Engine Configuration Module | ||
| 226 | This ENGINE configuration module has the name | ||
| 227 | .Ic engines . | ||
| 228 | The value of this variable points to a section containing further ENGINE | ||
| 229 | configuration information. | ||
| 230 | .Pp | ||
| 231 | The section pointed to by | ||
| 232 | .Ic engines | ||
| 233 | is a table of engine names (though see | ||
| 234 | .Ic engine_id | ||
| 235 | below) and further sections containing configuration information | ||
| 236 | specific to each ENGINE. | ||
| 237 | .Pp | ||
| 238 | Each ENGINE specific section is used to set default algorithms, load | ||
| 239 | dynamic, perform initialization and send ctrls. | ||
| 240 | The actual operation performed depends on the command | ||
| 241 | name which is the name of the name value pair. | ||
| 242 | The currently supported commands are listed below. | ||
| 243 | .Pp | ||
| 244 | For example: | ||
| 245 | .Bd -literal -offset indent | ||
| 246 | [engine_section] | ||
| 247 | # Configure ENGINE named "foo" | ||
| 248 | foo = foo_section | ||
| 249 | # Configure ENGINE named "bar" | ||
| 250 | bar = bar_section | ||
| 251 | |||
| 252 | [foo_section] | ||
| 253 | \&... foo ENGINE specific commands ... | ||
| 254 | |||
| 255 | [bar_section] | ||
| 256 | \&... "bar" ENGINE specific commands ... | ||
| 257 | .Ed | ||
| 258 | .Pp | ||
| 259 | The command | ||
| 260 | .Ic engine_id | ||
| 261 | is used to give the ENGINE name. | ||
| 262 | If used this command must be first. | ||
| 263 | For example: | ||
| 264 | .Bd -literal -offset indent | ||
| 265 | [engine_section] | ||
| 266 | # This would normally handle an ENGINE named "foo" | ||
| 267 | foo = foo_section | ||
| 268 | |||
| 269 | [foo_section] | ||
| 270 | # Override default name and use "myfoo" instead. | ||
| 271 | engine_id = myfoo | ||
| 272 | .Ed | ||
| 273 | .Pp | ||
| 274 | The command | ||
| 275 | .Ic dynamic_path | ||
| 276 | loads and adds an ENGINE from the given path. | ||
| 277 | It is equivalent to sending the ctrls | ||
| 278 | .Sy SO_PATH | ||
| 279 | with the path argument followed by | ||
| 280 | .Sy LIST_ADD | ||
| 281 | with value 2 and | ||
| 282 | .Sy LOAD | ||
| 283 | to the dynamic ENGINE. If this is not the required behaviour then | ||
| 284 | alternative ctrls can be sent directly to the dynamic ENGINE using ctrl | ||
| 285 | commands. | ||
| 286 | .Pp | ||
| 287 | The command | ||
| 288 | .Ic init | ||
| 289 | determines whether to initialize the ENGINE. | ||
| 290 | If the value is 0, the ENGINE will not be initialized. | ||
| 291 | If it is 1, an attempt is made to initialized the ENGINE immediately. | ||
| 292 | If the | ||
| 293 | .Ic init | ||
| 294 | command is not present, then an attempt will be made to initialize | ||
| 295 | the ENGINE after all commands in its section have been processed. | ||
| 296 | .Pp | ||
| 297 | The command | ||
| 298 | .Ic default_algorithms | ||
| 299 | sets the default algorithms an ENGINE will supply using the functions | ||
| 300 | .Xr ENGINE_set_default_string 3 . | ||
| 301 | .Pp | ||
| 302 | If the name matches none of the above command names it is assumed | ||
| 303 | to be a ctrl command which is sent to the ENGINE. | ||
| 304 | The value of the command is the argument to the ctrl command. | ||
| 305 | If the value is the string | ||
| 306 | .Cm EMPTY , | ||
| 307 | then no value is sent to the command. | ||
| 308 | .Pp | ||
| 309 | For example: | ||
| 310 | .Bd -literal -offset indent | ||
| 311 | [engine_section] | ||
| 312 | # Configure ENGINE named "foo" | ||
| 313 | foo = foo_section | ||
| 314 | |||
| 315 | [foo_section] | ||
| 316 | # Load engine from DSO | ||
| 317 | dynamic_path = /some/path/fooengine.so | ||
| 318 | # A foo specific ctrl. | ||
| 319 | some_ctrl = some_value | ||
| 320 | # Another ctrl that doesn't take a value. | ||
| 321 | other_ctrl = EMPTY | ||
| 322 | # Supply all default algorithms | ||
| 323 | default_algorithms = ALL | ||
| 324 | .Ed | ||
| 325 | .Ss SSL Configuration Module | ||
| 326 | This module has the name | ||
| 327 | .Ic ssl_conf | ||
| 328 | which points to a section containing SSL configurations. | ||
| 329 | .Pp | ||
| 330 | Each line in the SSL configuration section contains the name of the | ||
| 331 | configuration and the section containing it. | ||
| 332 | .Pp | ||
| 333 | Each configuration section consists of command value pairs for | ||
| 334 | .Vt SSL_CONF . | ||
| 335 | Each pair will be passed to a | ||
| 336 | .Vt SSL_CTX | ||
| 337 | or | ||
| 338 | .Vt SSL | ||
| 339 | structure if it calls | ||
| 340 | .Xr SSL_CTX_config 3 | ||
| 341 | or | ||
| 342 | .Xr SSL_config 3 | ||
| 343 | with the appropriate configuration name. | ||
| 344 | .Pp | ||
| 345 | Note: any characters before an initial dot in the configuration section | ||
| 346 | are ignored so the same command can be used multiple times. | ||
| 347 | .Pp | ||
| 348 | For example: | ||
| 349 | .Bd -literal -offset indent | ||
| 350 | ssl_conf = ssl_sect | ||
| 351 | |||
| 352 | [ssl_sect] | ||
| 353 | server = server_section | ||
| 354 | |||
| 355 | [server_section] | ||
| 356 | RSA.Certificate = server-rsa.pem | ||
| 357 | ECDSA.Certificate = server-ecdsa.pem | ||
| 358 | Ciphers = ALL:!RC4 | ||
| 359 | .Ed | ||
| 360 | .Sh FILES | ||
| 361 | .Bl -tag -width /etc/ssl/openssl.cnf -compact | ||
| 362 | .It Pa /etc/ssl/openssl.cnf | ||
| 363 | standard configuration file | ||
| 364 | .El | ||
| 365 | .Sh EXAMPLES | ||
| 366 | Here is a sample configuration file using some of the features | ||
| 367 | mentioned above: | ||
| 368 | .Bd -literal -offset indent | ||
| 369 | # This is the default section. | ||
| 370 | HOME=/temp | ||
| 371 | RANDFILE= ${ENV::HOME}/.rnd | ||
| 372 | configdir=$ENV::HOME/config | ||
| 373 | |||
| 374 | [ section_one ] | ||
| 375 | # We are now in section one. | ||
| 376 | |||
| 377 | # Quotes permit leading and trailing whitespace | ||
| 378 | any = " any variable name " | ||
| 379 | |||
| 380 | other = A string that can \e | ||
| 381 | cover several lines \e | ||
| 382 | by including \e\e characters | ||
| 383 | |||
| 384 | message = Hello World\en | ||
| 385 | |||
| 386 | [ section_two ] | ||
| 387 | greeting = $section_one::message | ||
| 388 | .Ed | ||
| 389 | .Pp | ||
| 390 | This next example shows how to expand environment variables safely. | ||
| 391 | .Pp | ||
| 392 | Suppose you want a variable called | ||
| 393 | .Sy tmpfile | ||
| 394 | to refer to a temporary filename. | ||
| 395 | The directory it is placed in can determined by the | ||
| 396 | .Ev TEMP | ||
| 397 | or | ||
| 398 | .Ev TMP | ||
| 399 | environment variables but they may not be set to any value at all. | ||
| 400 | If you just include the environment variable names and the variable | ||
| 401 | doesn't exist then this will cause an error when an attempt is made to | ||
| 402 | load the configuration file. | ||
| 403 | By making use of the default section both values can be looked up with | ||
| 404 | .Ev TEMP | ||
| 405 | taking priority and | ||
| 406 | .Pa /tmp | ||
| 407 | used if neither is defined: | ||
| 408 | .Bd -literal -offset indent | ||
| 409 | TMP=/tmp | ||
| 410 | # The above value is used if TMP isn't in the environment | ||
| 411 | TEMP=$ENV::TMP | ||
| 412 | # The above value is used if TEMP isn't in the environment | ||
| 413 | tmpfile=${ENV::TEMP}/tmp.filename | ||
| 414 | .Ed | ||
| 415 | .Pp | ||
| 416 | More complex OpenSSL library configuration. | ||
| 417 | Add OID: | ||
| 418 | .Bd -literal -offset indent | ||
| 419 | # Default appname: should match "appname" parameter (if any) | ||
| 420 | # supplied to CONF_modules_load_file et al. | ||
| 421 | openssl_conf = openssl_conf_section | ||
| 422 | |||
| 423 | [openssl_conf_section] | ||
| 424 | # Configuration module list | ||
| 425 | alg_section = evp_sect | ||
| 426 | oid_section = new_oids | ||
| 427 | |||
| 428 | [new_oids] | ||
| 429 | # New OID, just short name | ||
| 430 | newoid1 = 1.2.3.4.1 | ||
| 431 | # New OID shortname and long name | ||
| 432 | newoid2 = New OID 2 long name, 1.2.3.4.2 | ||
| 433 | .Ed | ||
| 434 | .Pp | ||
| 435 | The above examples can be used with any application supporting library | ||
| 436 | configuration if "openssl_conf" is modified to match the appropriate | ||
| 437 | "appname". | ||
| 438 | .Pp | ||
| 439 | For example if the second sample file above is saved to "example.cnf" | ||
| 440 | then the command line: | ||
| 441 | .Pp | ||
| 442 | .Dl OPENSSL_CONF=example.cnf openssl asn1parse -genstr OID:1.2.3.4.1 | ||
| 443 | .Pp | ||
| 444 | will output: | ||
| 445 | .Dl 0:d=0 hl=2 l= 4 prim: OBJECT :newoid1 | ||
| 446 | .Pp | ||
| 447 | showing that the OID "newoid1" has been added as "1.2.3.4.1". | ||
| 448 | .Sh SEE ALSO | ||
| 449 | .Xr openssl 1 , | ||
| 450 | .Xr CONF_modules_load_file 3 , | ||
| 451 | .Xr x509v3.cnf 5 | ||
| 452 | .Sh CAVEATS | ||
| 453 | If a configuration file attempts to expand a variable that doesn't | ||
| 454 | exist, then an error is flagged and the file will not load. | ||
| 455 | This can also happen if an attempt is made to expand an environment | ||
| 456 | variable that doesn't exist. | ||
| 457 | For example, in a previous version of OpenSSL the default OpenSSL | ||
| 458 | master configuration file used the value of | ||
| 459 | .Ev HOME | ||
| 460 | which may not be defined on non Unix systems and would cause an error. | ||
| 461 | .Pp | ||
| 462 | This can be worked around by including a default section to provide | ||
| 463 | a default value: then if the environment lookup fails, the default | ||
| 464 | value will be used instead. | ||
| 465 | For this to work properly, the default value must be defined earlier | ||
| 466 | in the configuration file than the expansion. | ||
| 467 | See the | ||
| 468 | .Sx EXAMPLES | ||
| 469 | section for an example of how to do this. | ||
| 470 | .Pp | ||
| 471 | If the same variable is defined more than once in the same section, | ||
| 472 | then all but the last value will be silently ignored. | ||
| 473 | In certain circumstances such as with DNs, the same field may occur | ||
| 474 | multiple times. | ||
| 475 | This is usually worked around by ignoring any characters before an | ||
| 476 | initial | ||
| 477 | .Ql \&. , | ||
| 478 | for example: | ||
| 479 | .Bd -literal -offset indent | ||
| 480 | 1.OU="My first OU" | ||
| 481 | 2.OU="My Second OU" | ||
| 482 | .Ed | ||
| 483 | .Sh BUGS | ||
| 484 | Currently there is no way to include characters using the octal | ||
| 485 | .Pf \e Ar nnn | ||
| 486 | form. | ||
| 487 | Strings are all NUL terminated, so NUL bytes cannot form part of | ||
| 488 | the value. | ||
| 489 | .Pp | ||
| 490 | The escaping isn't quite right: if you want to use sequences like | ||
| 491 | .Ql \en , | ||
| 492 | you can't use any quote escaping on the same line. | ||
| 493 | .Pp | ||
| 494 | Files are loaded in a single pass. | ||
| 495 | This means that an variable expansion will only work if the variables | ||
| 496 | referenced are defined earlier in the file. | ||
| diff --git a/src/lib/libcrypto/man/x509v3.cnf.5 b/src/lib/libcrypto/man/x509v3.cnf.5 new file mode 100644 index 0000000000..22e013a87e --- /dev/null +++ b/src/lib/libcrypto/man/x509v3.cnf.5 | |||
| @@ -0,0 +1,731 @@ | |||
| 1 | .\" $OpenBSD: x509v3.cnf.5,v 1.1 2016/12/11 18:06:09 schwarze Exp $ | ||
| 2 | .\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | ||
| 3 | .\" | ||
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
| 5 | .\" Copyright (c) 2004, 2006, 2013, 2014, 2015, 2016 The OpenSSL Project. | ||
| 6 | .\" All rights reserved. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" | ||
| 12 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 13 | .\" notice, this list of conditions and the following disclaimer. | ||
| 14 | .\" | ||
| 15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | .\" notice, this list of conditions and the following disclaimer in | ||
| 17 | .\" the documentation and/or other materials provided with the | ||
| 18 | .\" distribution. | ||
| 19 | .\" | ||
| 20 | .\" 3. All advertising materials mentioning features or use of this | ||
| 21 | .\" software must display the following acknowledgment: | ||
| 22 | .\" "This product includes software developed by the OpenSSL Project | ||
| 23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 24 | .\" | ||
| 25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | .\" endorse or promote products derived from this software without | ||
| 27 | .\" prior written permission. For written permission, please contact | ||
| 28 | .\" openssl-core@openssl.org. | ||
| 29 | .\" | ||
| 30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 32 | .\" permission of the OpenSSL Project. | ||
| 33 | .\" | ||
| 34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | .\" acknowledgment: | ||
| 36 | .\" "This product includes software developed by the OpenSSL Project | ||
| 37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 38 | .\" | ||
| 39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | .\" | ||
| 52 | .Dd $Mdocdate: December 11 2016 $ | ||
| 53 | .Dt X509V3.CNF 5 | ||
| 54 | .Os | ||
| 55 | .Sh NAME | ||
| 56 | .Nm x509v3.cnf | ||
| 57 | .Nd X.509 V3 certificate extension configuration format | ||
| 58 | .Sh DESCRIPTION | ||
| 59 | Several of the OpenSSL utilities can add extensions to a certificate or | ||
| 60 | certificate request based on the contents of a configuration file. | ||
| 61 | The file format is based on the | ||
| 62 | .Xr openssl.cnf 5 | ||
| 63 | format. | ||
| 64 | .Pp | ||
| 65 | Typically the application will contain an option to point to an | ||
| 66 | extension section. | ||
| 67 | Each line of the extension section takes the form: | ||
| 68 | .Pp | ||
| 69 | .D1 Ar extension_name Ns = Ns Oo Cm critical , Oc Ar extension_options | ||
| 70 | .Pp | ||
| 71 | If | ||
| 72 | .Cm critical | ||
| 73 | is present, then the extension will be critical. | ||
| 74 | .Pp | ||
| 75 | The format of | ||
| 76 | .Ar extension_options | ||
| 77 | depends on the value of | ||
| 78 | .Ar extension_name . | ||
| 79 | .Pp | ||
| 80 | There are four main types of extension: string extensions, multi-valued | ||
| 81 | extensions, raw extensions, and arbitrary extensions. | ||
| 82 | .Pp | ||
| 83 | String extensions simply have a string which contains either the value | ||
| 84 | itself or how it is obtained. | ||
| 85 | For example: | ||
| 86 | .Pp | ||
| 87 | .Dl nsComment="This is a Comment" | ||
| 88 | .Pp | ||
| 89 | Multi-valued extensions have a short form and a long form. | ||
| 90 | The short form is a list of names and values: | ||
| 91 | .Pp | ||
| 92 | .Dl basicConstraints=critical,CA:true,pathlen:1 | ||
| 93 | .Pp | ||
| 94 | The long form allows the values to be placed in a separate section: | ||
| 95 | .Bd -literal -offset indent | ||
| 96 | basicConstraints=critical,@bs_section | ||
| 97 | |||
| 98 | [bs_section] | ||
| 99 | CA=true | ||
| 100 | pathlen=1 | ||
| 101 | .Ed | ||
| 102 | .Pp | ||
| 103 | Both forms are equivalent. | ||
| 104 | .Pp | ||
| 105 | The syntax of raw extensions is governed by the extension code: | ||
| 106 | it can for example contain data in multiple sections. | ||
| 107 | The correct syntax to use is defined by the extension code itself: | ||
| 108 | check out the certificate policies extension for an example. | ||
| 109 | .Pp | ||
| 110 | If an extension type is unsupported, then the arbitrary extension | ||
| 111 | syntax must be used, see the | ||
| 112 | .Sx ARBITRARY EXTENSIONS | ||
| 113 | section for more details. | ||
| 114 | .Sh STANDARD EXTENSIONS | ||
| 115 | The following sections describe each supported extension in detail. | ||
| 116 | .Ss Basic constraints | ||
| 117 | This is a multi-valued extension which indicates whether a certificate | ||
| 118 | is a CA certificate. | ||
| 119 | The first (mandatory) name is | ||
| 120 | .Ic CA | ||
| 121 | followed by | ||
| 122 | .Cm TRUE | ||
| 123 | or | ||
| 124 | .Cm FALSE . | ||
| 125 | If | ||
| 126 | .Ic CA | ||
| 127 | is | ||
| 128 | .Cm TRUE , | ||
| 129 | then an optional | ||
| 130 | .Ic pathlen | ||
| 131 | name followed by an non-negative value can be included. | ||
| 132 | For example: | ||
| 133 | .Bd -literal -offset indent | ||
| 134 | basicConstraints=CA:TRUE | ||
| 135 | basicConstraints=CA:FALSE | ||
| 136 | basicConstraints=critical,CA:TRUE, pathlen:0 | ||
| 137 | .Ed | ||
| 138 | .Pp | ||
| 139 | A CA certificate must include the | ||
| 140 | .Ic basicConstraints | ||
| 141 | value with the | ||
| 142 | .Ic CA | ||
| 143 | field set to | ||
| 144 | .Cm TRUE . | ||
| 145 | An end user certificate must either set | ||
| 146 | .Ic CA | ||
| 147 | to | ||
| 148 | .Cm FALSE | ||
| 149 | or exclude the extension entirely. | ||
| 150 | Some software may require the inclusion of | ||
| 151 | .Ic basicConstraints | ||
| 152 | with | ||
| 153 | .Ic CA | ||
| 154 | set to | ||
| 155 | .Cm FALSE | ||
| 156 | for end entity certificates. | ||
| 157 | .Pp | ||
| 158 | The | ||
| 159 | .Ic pathlen | ||
| 160 | parameter indicates the maximum number of CAs that can appear below | ||
| 161 | this one in a chain. | ||
| 162 | So if you have a CA with a | ||
| 163 | .Ic pathlen | ||
| 164 | of zero it can only be used to sign end user certificates and not | ||
| 165 | further CAs. | ||
| 166 | .Ss Key usage | ||
| 167 | Key usage is a multi-valued extension consisting of a list of names of | ||
| 168 | the permitted key usages. | ||
| 169 | .Pp | ||
| 170 | The supported names are: | ||
| 171 | .Ic digitalSignature , | ||
| 172 | .Ic nonRepudiation , | ||
| 173 | .Ic keyEncipherment , | ||
| 174 | .Ic dataEncipherment , | ||
| 175 | .Ic keyAgreement , | ||
| 176 | .Ic keyCertSign , | ||
| 177 | .Ic cRLSign , | ||
| 178 | .Ic encipherOnly , | ||
| 179 | and | ||
| 180 | .Ic decipherOnly . | ||
| 181 | Examples: | ||
| 182 | .Bd -literal -offset indent | ||
| 183 | keyUsage=digitalSignature, nonRepudiation | ||
| 184 | keyUsage=critical, keyCertSign | ||
| 185 | .Ed | ||
| 186 | .Ss Extended key usage | ||
| 187 | This extensions consists of a list of usages indicating purposes for | ||
| 188 | which the certificate public key can be used for. | ||
| 189 | .Pp | ||
| 190 | These can either be object short names or the dotted numerical form of OIDs. | ||
| 191 | While any OID can be used, only certain values make sense. | ||
| 192 | In particular the following PKIX, NS and MS values are meaningful: | ||
| 193 | .Bl -column emailProtection | ||
| 194 | .It Em value Ta Em meaning | ||
| 195 | .It Ic serverAuth Ta SSL/TLS web server authentication | ||
| 196 | .It Ic clientAuth Ta SSL/TLS web client authentication | ||
| 197 | .It Ic codeSigning Ta code signing | ||
| 198 | .It Ic emailProtection Ta E-mail protection (S/MIME) | ||
| 199 | .It Ic timeStamping Ta trusted timestamping | ||
| 200 | .It Ic OCSPSigning Ta OCSP signing | ||
| 201 | .It Ic ipsecIKE Ta IPsec internet key exchange | ||
| 202 | .It Ic msCodeInd Ta Microsoft individual code signing (authenticode) | ||
| 203 | .It Ic msCodeCom Ta Microsoft commercial code signing (authenticode) | ||
| 204 | .It Ic msCTLSign Ta Microsoft trust list signing | ||
| 205 | .It Ic msEFS Ta Microsoft encrypted file system | ||
| 206 | .El | ||
| 207 | .Pp | ||
| 208 | Examples: | ||
| 209 | .Bd -literal -offset indent | ||
| 210 | extendedKeyUsage=critical,codeSigning,1.2.3.4 | ||
| 211 | extendedKeyUsage=serverAuth,clientAuth | ||
| 212 | .Ed | ||
| 213 | .Ss Subject key identifier | ||
| 214 | This is really a string extension and can take two possible values. | ||
| 215 | Either the word | ||
| 216 | .Cm hash | ||
| 217 | which will automatically follow the guidelines in RFC 3280 | ||
| 218 | or a hex string giving the extension value to include. | ||
| 219 | The use of the hex string is strongly discouraged. | ||
| 220 | Example: | ||
| 221 | .Pp | ||
| 222 | .Dl subjectKeyIdentifier=hash | ||
| 223 | .Ss Authority key identifier | ||
| 224 | The authority key identifier extension permits two options, | ||
| 225 | .Cm keyid | ||
| 226 | and | ||
| 227 | .Cm issuer : | ||
| 228 | both can take the optional value | ||
| 229 | .Cm always . | ||
| 230 | .Pp | ||
| 231 | If the | ||
| 232 | .Cm keyid | ||
| 233 | option is present, an attempt is made to copy the subject | ||
| 234 | key identifier from the parent certificate. | ||
| 235 | If the value | ||
| 236 | .Cm always | ||
| 237 | is present, then an error is returned if the option fails. | ||
| 238 | .Pp | ||
| 239 | The | ||
| 240 | .Cm issuer | ||
| 241 | option copies the issuer and serial number from the issuer certificate. | ||
| 242 | This will only be done if the | ||
| 243 | .Cm keyid | ||
| 244 | option fails or is not included unless the | ||
| 245 | .Cm always | ||
| 246 | flag will always include the value. | ||
| 247 | Example: | ||
| 248 | .Pp | ||
| 249 | .Dl authorityKeyIdentifier=keyid,issuer | ||
| 250 | .Ss Subject alternative name | ||
| 251 | The subject alternative name extension allows various literal values to | ||
| 252 | be included in the configuration file. | ||
| 253 | These include | ||
| 254 | .Ic email | ||
| 255 | (an email address), | ||
| 256 | .Ic URI | ||
| 257 | (a uniform resource indicator), | ||
| 258 | .Ic DNS | ||
| 259 | (a DNS domain name), | ||
| 260 | .Ic RID | ||
| 261 | (a registered ID: OBJECT IDENTIFIER), | ||
| 262 | .Ic IP | ||
| 263 | (an IP address), | ||
| 264 | .Ic dirName | ||
| 265 | (a distinguished name), and | ||
| 266 | .Ic otherName . | ||
| 267 | .Pp | ||
| 268 | The | ||
| 269 | .Ic email | ||
| 270 | option include a special | ||
| 271 | .Cm copy | ||
| 272 | value. | ||
| 273 | This will automatically include any email addresses contained in the | ||
| 274 | certificate subject name in the extension. | ||
| 275 | .Pp | ||
| 276 | The IP address used in the | ||
| 277 | .Ic IP | ||
| 278 | options can be in either IPv4 or IPv6 format. | ||
| 279 | .Pp | ||
| 280 | The value of | ||
| 281 | .Ic dirName | ||
| 282 | should point to a section containing the distinguished name to use as a | ||
| 283 | set of name value pairs. | ||
| 284 | Multi values AVAs can be formed by prefacing the name with a | ||
| 285 | .Ql + | ||
| 286 | character. | ||
| 287 | .Pp | ||
| 288 | .Ic otherName | ||
| 289 | can include arbitrary data associated with an OID: the value should | ||
| 290 | be the OID followed by a semicolon and the content in standard | ||
| 291 | .Xr ASN1_generate_nconf 3 | ||
| 292 | format. | ||
| 293 | Examples: | ||
| 294 | .Bd -literal -offset 2n | ||
| 295 | subjectAltName=email:copy,email:my@other.address,URI:http://my.url.here/ | ||
| 296 | subjectAltName=IP:192.168.7.1 | ||
| 297 | subjectAltName=IP:13::17 | ||
| 298 | subjectAltName=email:my@other.address,RID:1.2.3.4 | ||
| 299 | subjectAltName=otherName:1.2.3.4;UTF8:some other identifier | ||
| 300 | |||
| 301 | subjectAltName=dirName:dir_sect | ||
| 302 | |||
| 303 | [dir_sect] | ||
| 304 | C=UK | ||
| 305 | O=My Organization | ||
| 306 | OU=My Unit | ||
| 307 | CN=My Name | ||
| 308 | .Ed | ||
| 309 | .Ss Issuer alternative name | ||
| 310 | The issuer alternative name option supports all the literal options of | ||
| 311 | subject alternative name. | ||
| 312 | It does not support the | ||
| 313 | .Ic email : Ns Cm copy | ||
| 314 | option because that would not make sense. | ||
| 315 | It does support an additional | ||
| 316 | .Ic issuer : Ns Cm copy | ||
| 317 | option that will copy all the subject alternative name values from | ||
| 318 | the issuer certificate (if possible). | ||
| 319 | Example: | ||
| 320 | .Pp | ||
| 321 | .Dl issuserAltName = issuer:copy | ||
| 322 | .Ss Authority info access | ||
| 323 | The authority information access extension gives details about how to | ||
| 324 | access certain information relating to the CA. | ||
| 325 | Its syntax is | ||
| 326 | .Ar accessOID ; location | ||
| 327 | where | ||
| 328 | .Ar location | ||
| 329 | has the same syntax as subject alternative name (except that | ||
| 330 | .Ic email : Ns Cm copy | ||
| 331 | is not supported). | ||
| 332 | .Ar accessOID | ||
| 333 | can be any valid OID but only certain values are meaningful, | ||
| 334 | for example | ||
| 335 | .Cm OCSP | ||
| 336 | and | ||
| 337 | .Cm caIssuers . | ||
| 338 | Example: | ||
| 339 | .Bd -literal -offset indent | ||
| 340 | authorityInfoAccess = OCSP;URI:http://ocsp.my.host/ | ||
| 341 | authorityInfoAccess = caIssuers;URI:http://my.ca/ca.html | ||
| 342 | .Ed | ||
| 343 | .Ss CRL distribution points | ||
| 344 | This is a multi-valued extension whose options can be either in | ||
| 345 | .Ar name : Ns Ar value | ||
| 346 | pair form using the same form as subject alternative name or a | ||
| 347 | single value representing a section name containing all the | ||
| 348 | distribution point fields. | ||
| 349 | .Pp | ||
| 350 | For a | ||
| 351 | .Ar name : Ns Ar value | ||
| 352 | pair a new DistributionPoint with the fullName field set to the | ||
| 353 | given value, both the cRLissuer and reasons fields are omitted in | ||
| 354 | this case. | ||
| 355 | .Pp | ||
| 356 | In the single option case, the section indicated contains values | ||
| 357 | for each field. | ||
| 358 | In this section: | ||
| 359 | .Pp | ||
| 360 | If the name is | ||
| 361 | .Ic fullname , | ||
| 362 | the value field should contain the full name of the distribution | ||
| 363 | point in the same format as subject alternative name. | ||
| 364 | .Pp | ||
| 365 | If the name is | ||
| 366 | .Ic relativename , | ||
| 367 | then the value field should contain a section name whose contents | ||
| 368 | represent a DN fragment to be placed in this field. | ||
| 369 | .Pp | ||
| 370 | The name | ||
| 371 | .Ic CRLIssuer , | ||
| 372 | if present, should contain a value for this field in subject | ||
| 373 | alternative name format. | ||
| 374 | .Pp | ||
| 375 | If the name is | ||
| 376 | .Ic reasons , | ||
| 377 | the value field should consist of a comma separated field containing | ||
| 378 | the reasons. | ||
| 379 | Valid reasons are: | ||
| 380 | .Cm keyCompromise , | ||
| 381 | .Cm CACompromise , | ||
| 382 | .Cm affiliationChanged , | ||
| 383 | .Cm superseded , | ||
| 384 | .Cm cessationOfOperation , | ||
| 385 | .Cm certificateHold , | ||
| 386 | .Cm privilegeWithdrawn , | ||
| 387 | and | ||
| 388 | .Cm AACompromise . | ||
| 389 | .Pp | ||
| 390 | Simple examples: | ||
| 391 | .Bd -literal -offset indent | ||
| 392 | crlDistributionPoints=URI:http://myhost.com/myca.crl | ||
| 393 | crlDistributionPoints=URI:http://my.com/my.crl,URI:http://oth.com/my.crl | ||
| 394 | .Ed | ||
| 395 | .Pp | ||
| 396 | Full distribution point example: | ||
| 397 | .Bd -literal -offset indent | ||
| 398 | crlDistributionPoints=crldp1_section | ||
| 399 | |||
| 400 | [crldp1_section] | ||
| 401 | fullname=URI:http://myhost.com/myca.crl | ||
| 402 | CRLissuer=dirName:issuer_sect | ||
| 403 | reasons=keyCompromise, CACompromise | ||
| 404 | |||
| 405 | [issuer_sect] | ||
| 406 | C=UK | ||
| 407 | O=Organisation | ||
| 408 | CN=Some Name | ||
| 409 | .Ed | ||
| 410 | .Ss Issuing distribution point | ||
| 411 | This extension should only appear in CRLs. | ||
| 412 | It is a multi-valued extension whose syntax is similar to the "section" | ||
| 413 | pointed to by the CRL distribution points extension with a few | ||
| 414 | differences. | ||
| 415 | .Pp | ||
| 416 | The names | ||
| 417 | .Ic reasons | ||
| 418 | and | ||
| 419 | .Ic CRLissuer | ||
| 420 | are not recognized. | ||
| 421 | .Pp | ||
| 422 | The name | ||
| 423 | .Ic onlysomereasons | ||
| 424 | is accepted which sets this field. | ||
| 425 | The value is in the same format as the CRL distribution point | ||
| 426 | .Ic reasons | ||
| 427 | field. | ||
| 428 | .Pp | ||
| 429 | The names | ||
| 430 | .Ic onlyuser , | ||
| 431 | .Ic onlyCA , | ||
| 432 | .Ic onlyAA , | ||
| 433 | and | ||
| 434 | .Ic indirectCRL | ||
| 435 | are also accepted. | ||
| 436 | The values should be a boolean values | ||
| 437 | .Cm ( TRUE | ||
| 438 | or | ||
| 439 | .Cm FALSE ) | ||
| 440 | to indicate the value of the corresponding field. | ||
| 441 | Example: | ||
| 442 | .Bd -literal -offset indent | ||
| 443 | issuingDistributionPoint=critical, @idp_section | ||
| 444 | |||
| 445 | [idp_section] | ||
| 446 | fullname=URI:http://myhost.com/myca.crl | ||
| 447 | indirectCRL=TRUE | ||
| 448 | onlysomereasons=keyCompromise, CACompromise | ||
| 449 | |||
| 450 | [issuer_sect] | ||
| 451 | C=UK | ||
| 452 | O=Organisation | ||
| 453 | CN=Some Name | ||
| 454 | .Ed | ||
| 455 | .Ss Certificate policies | ||
| 456 | This is a raw extension. | ||
| 457 | All the fields of this extension can be set by using the appropriate | ||
| 458 | syntax. | ||
| 459 | .Pp | ||
| 460 | If you follow the PKIX recommendations and just using one OID, then you | ||
| 461 | just include the value of that OID. | ||
| 462 | Multiple OIDs can be set separated by commas, for example: | ||
| 463 | .Pp | ||
| 464 | .Dl certificatePolicies= 1.2.4.5, 1.1.3.4 | ||
| 465 | .Pp | ||
| 466 | If you wish to include qualifiers, then the policy OID and qualifiers | ||
| 467 | need to be specified in a separate section: this is done by using the | ||
| 468 | .Pf @ Ar section | ||
| 469 | syntax instead of a literal OID value. | ||
| 470 | .Pp | ||
| 471 | The section referred to must include the policy OID using the name | ||
| 472 | .Ic policyIdentifier . | ||
| 473 | .Ic CPSuri | ||
| 474 | qualifiers can be included using the syntax: | ||
| 475 | .Pp | ||
| 476 | .D1 Ic CPS . Ns Ar nnn Ns = Ns Ar value | ||
| 477 | .Pp | ||
| 478 | .Ic userNotice | ||
| 479 | qualifiers can be set using the syntax: | ||
| 480 | .Pp | ||
| 481 | .D1 Ic userNotice . Ns Ar nnn Ns =@ Ns Ar notice | ||
| 482 | .Pp | ||
| 483 | The value of the | ||
| 484 | .Ic userNotice | ||
| 485 | qualifier is specified in the relevant section. | ||
| 486 | This section can include | ||
| 487 | .Ic explicitText , | ||
| 488 | .Ic organization , | ||
| 489 | and | ||
| 490 | .Ic noticeNumbers | ||
| 491 | options. | ||
| 492 | .Ic explicitText | ||
| 493 | and | ||
| 494 | .Ic organization | ||
| 495 | are text strings, | ||
| 496 | .Ic noticeNumbers | ||
| 497 | is a comma separated list of numbers. | ||
| 498 | The | ||
| 499 | .Ic organization | ||
| 500 | and | ||
| 501 | .Ic noticeNumbers | ||
| 502 | options (if included) must | ||
| 503 | .Em both | ||
| 504 | be present. | ||
| 505 | If you use the | ||
| 506 | .Ic userNotice | ||
| 507 | option with IE5 then you need the | ||
| 508 | .Ic ia5org | ||
| 509 | option at the top level to modify the encoding: otherwise it will | ||
| 510 | not be interpreted properly. | ||
| 511 | Example: | ||
| 512 | .Bd -literal -offset indent | ||
| 513 | certificatePolicies=ia5org,1.2.3.4,1.5.6.7.8,@polsect | ||
| 514 | |||
| 515 | [polsect] | ||
| 516 | policyIdentifier = 1.3.5.8 | ||
| 517 | CPS.1="http://my.host.name/" | ||
| 518 | CPS.2="http://my.your.name/" | ||
| 519 | userNotice.1=@notice | ||
| 520 | |||
| 521 | [notice] | ||
| 522 | explicitText="Explicit Text Here" | ||
| 523 | organization="Organisation Name" | ||
| 524 | noticeNumbers=1,2,3,4 | ||
| 525 | .Ed | ||
| 526 | .Pp | ||
| 527 | The | ||
| 528 | .Ic ia5org | ||
| 529 | option changes the type of the | ||
| 530 | .Ic organization | ||
| 531 | field. | ||
| 532 | In RFC 2459, it can only be of type DisplayText. | ||
| 533 | In RFC 3280, IA5Strring is also permissible. | ||
| 534 | Some software (for example some versions of MSIE) may require | ||
| 535 | .Ic ia5org . | ||
| 536 | .Ss Policy constraints | ||
| 537 | This is a multi-valued extension which consists of the names | ||
| 538 | .Ic requireExplicitPolicy | ||
| 539 | or | ||
| 540 | .Ic inhibitPolicyMapping | ||
| 541 | and a non-negative integer value. | ||
| 542 | At least one component must be present. | ||
| 543 | Example: | ||
| 544 | .Pp | ||
| 545 | .Dl policyConstraints = requireExplicitPolicy:3 | ||
| 546 | .Ss Inhibit any policy | ||
| 547 | This is a string extension whose value must be a non-negative integer. | ||
| 548 | Example: | ||
| 549 | .Pp | ||
| 550 | .Dl inhibitAnyPolicy = 2 | ||
| 551 | .Ss Name constraints | ||
| 552 | The name constraints extension is a multi-valued extension. | ||
| 553 | The name should begin with the word | ||
| 554 | .Cm permitted | ||
| 555 | or | ||
| 556 | .Cm excluded | ||
| 557 | followed by a semicolon. | ||
| 558 | The rest of the name and the value follows the syntax of subjectAltName | ||
| 559 | except | ||
| 560 | .Ic email : Ns Cm copy | ||
| 561 | is not supported and the | ||
| 562 | .Ic IP | ||
| 563 | form should consist of an IP addresses and subnet mask separated | ||
| 564 | by a slash. | ||
| 565 | Examples: | ||
| 566 | .Bd -literal -offset indent | ||
| 567 | nameConstraints=permitted;IP:192.168.0.0/255.255.0.0 | ||
| 568 | nameConstraints=permitted;email:.somedomain.com | ||
| 569 | nameConstraints=excluded;email:.com | ||
| 570 | .Ed | ||
| 571 | .Ss OCSP no check | ||
| 572 | The OCSP no check extension is a string extension, | ||
| 573 | but its value is ignored. | ||
| 574 | Example: | ||
| 575 | .Pp | ||
| 576 | .Dl noCheck = ignored | ||
| 577 | .Ss TLS Feature (aka must staple) | ||
| 578 | This is a multi-valued extension consisting of a list of TLS extension | ||
| 579 | identifiers. | ||
| 580 | Each identifier may be a number in the range from 0 to 65535 or a | ||
| 581 | supported name. | ||
| 582 | When a TLS client sends a listed extension, the TLS server is expected | ||
| 583 | to include that extension in its reply. | ||
| 584 | .Pp | ||
| 585 | The supported names are: | ||
| 586 | .Cm status_request | ||
| 587 | and | ||
| 588 | .Cm status_request_v2 . | ||
| 589 | Example: | ||
| 590 | .Pp | ||
| 591 | .Dl tlsfeature = status_request | ||
| 592 | .Sh DEPRECATED EXTENSIONS | ||
| 593 | The following extensions are non standard, Netscape specific and largely | ||
| 594 | obsolete. | ||
| 595 | Their use in new applications is discouraged. | ||
| 596 | .Ss Netscape string extensions | ||
| 597 | Netscape comment | ||
| 598 | .Ic ( nsComment ) | ||
| 599 | is a string extension containing a comment which will be displayed when | ||
| 600 | the certificate is viewed in some browsers. | ||
| 601 | Example: | ||
| 602 | .Pp | ||
| 603 | .Dl nsComment = "Some Random Comment" | ||
| 604 | .Pp | ||
| 605 | Other supported extensions in this category are: | ||
| 606 | .Ic nsBaseUrl , | ||
| 607 | .Ic nsRevocationUrl , | ||
| 608 | .Ic nsCaRevocationUrl , | ||
| 609 | .Ic nsRenewalUrl , | ||
| 610 | .Ic nsCaPolicyUrl , | ||
| 611 | and | ||
| 612 | .Ic nsSslServerName . | ||
| 613 | .Ss Netscape certificate type | ||
| 614 | This is a multi-valued extensions which consists of a list of flags to | ||
| 615 | be included. | ||
| 616 | It was used to indicate the purposes for which a certificate could be | ||
| 617 | used. | ||
| 618 | The | ||
| 619 | .Ic basicConstraints , | ||
| 620 | .Ic keyUsage , | ||
| 621 | and extended key usage extensions are now used instead. | ||
| 622 | .Pp | ||
| 623 | Acceptable values for | ||
| 624 | .Ic nsCertType | ||
| 625 | are: | ||
| 626 | .Cm client , | ||
| 627 | .Cm server , | ||
| 628 | .Cm email , | ||
| 629 | .Cm objsign , | ||
| 630 | .Cm reserved , | ||
| 631 | .Cm sslCA , | ||
| 632 | .Cm emailCA , | ||
| 633 | .Cm objCA . | ||
| 634 | .Sh ARBITRARY EXTENSIONS | ||
| 635 | If an extension is not supported by the OpenSSL code, then it must | ||
| 636 | be encoded using the arbitrary extension format. | ||
| 637 | It is also possible to use the arbitrary format for supported | ||
| 638 | extensions. | ||
| 639 | Extreme care should be taken to ensure that the data is formatted | ||
| 640 | correctly for the given extension type. | ||
| 641 | .Pp | ||
| 642 | There are two ways to encode arbitrary extensions. | ||
| 643 | .Pp | ||
| 644 | The first way is to use the word | ||
| 645 | .Cm ASN1 | ||
| 646 | followed by the extension content using the same syntax as | ||
| 647 | .Xr ASN1_generate_nconf 3 . | ||
| 648 | For example: | ||
| 649 | .Bd -literal -offset indent | ||
| 650 | 1.2.3.4=critical,ASN1:UTF8String:Some random data | ||
| 651 | 1.2.3.4=ASN1:SEQUENCE:seq_sect | ||
| 652 | |||
| 653 | [seq_sect] | ||
| 654 | field1 = UTF8:field1 | ||
| 655 | field2 = UTF8:field2 | ||
| 656 | .Ed | ||
| 657 | .Pp | ||
| 658 | It is also possible to use the word | ||
| 659 | .Cm DER | ||
| 660 | to include the raw encoded data in any extension. | ||
| 661 | .Bd -literal -offset indent | ||
| 662 | 1.2.3.4=critical,DER:01:02:03:04 | ||
| 663 | 1.2.3.4=DER:01020304 | ||
| 664 | .Ed | ||
| 665 | .Pp | ||
| 666 | The value following | ||
| 667 | .Cm DER | ||
| 668 | is a hex dump of the DER encoding of the extension. | ||
| 669 | Any extension can be placed in this form to override the default behaviour. | ||
| 670 | For example: | ||
| 671 | .Pp | ||
| 672 | .Dl basicConstraints=critical,DER:00:01:02:03 | ||
| 673 | .Sh FILES | ||
| 674 | .Bl -tag -width /etc/ssl/x509v3.cnf -compact | ||
| 675 | .It Pa /etc/ssl/x509v3.cnf | ||
| 676 | standard configuration file | ||
| 677 | .El | ||
| 678 | .Sh SEE ALSO | ||
| 679 | .Xr openssl 1 , | ||
| 680 | .Xr ASN1_generate_nconf 3 , | ||
| 681 | .Xr openssl.cnf 5 | ||
| 682 | .Sh HISTORY | ||
| 683 | X509v3 extension code was first added to OpenSSL 0.9.2. | ||
| 684 | .Sh CAVEATS | ||
| 685 | There is no guarantee that a specific implementation will process a | ||
| 686 | given extension. | ||
| 687 | It may therefore sometimes be possible to use certificates for purposes | ||
| 688 | prohibited by their extensions because a specific application does not | ||
| 689 | recognize or honour the values of the relevant extensions. | ||
| 690 | .Pp | ||
| 691 | The | ||
| 692 | .Cm DER | ||
| 693 | and | ||
| 694 | .Cm ASN1 | ||
| 695 | options should be used with caution. | ||
| 696 | It is possible to create totally invalid extensions if they are not used | ||
| 697 | carefully. | ||
| 698 | .Pp | ||
| 699 | If an extension is multi-value and a field value must contain a comma, | ||
| 700 | the long form must be used. | ||
| 701 | Otherwise the comma would be misinterpreted as a field separator. | ||
| 702 | For example, | ||
| 703 | .Pp | ||
| 704 | .Dl subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar | ||
| 705 | .Pp | ||
| 706 | will produce an error, but the following form is valid: | ||
| 707 | .Bd -literal -offset indent | ||
| 708 | subjectAltName=@subject_alt_section | ||
| 709 | |||
| 710 | [subject_alt_section] | ||
| 711 | subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar | ||
| 712 | .Ed | ||
| 713 | .Pp | ||
| 714 | Due to the behaviour of the OpenSSL CONF library, the same field | ||
| 715 | name can only occur once in a section. | ||
| 716 | That means that | ||
| 717 | .Bd -literal -offset indent | ||
| 718 | subjectAltName=@alt_section | ||
| 719 | |||
| 720 | [alt_section] | ||
| 721 | email=steve@here | ||
| 722 | email=steve@there | ||
| 723 | .Ed | ||
| 724 | .Pp | ||
| 725 | will only use the last value. | ||
| 726 | This can be worked around by using the form: | ||
| 727 | .Bd -literal -offset indent | ||
| 728 | [alt_section] | ||
| 729 | email.1=steve@here | ||
| 730 | email.2=steve@there | ||
| 731 | .Ed | ||
