1e71b7053SJung-uk Kim=pod 2e71b7053SJung-uk Kim 3e71b7053SJung-uk Kim=head1 NAME 4e71b7053SJung-uk Kim 5e71b7053SJung-uk Kimx509v3_config - X509 V3 certificate extension configuration format 6e71b7053SJung-uk Kim 7e71b7053SJung-uk Kim=head1 DESCRIPTION 8e71b7053SJung-uk Kim 9*b077aed3SPierre ProncherySeveral OpenSSL commands can add extensions to a certificate or 10*b077aed3SPierre Proncherycertificate request based on the contents of a configuration file 11*b077aed3SPierre Proncheryand CLI options such as B<-addext>. 12*b077aed3SPierre ProncheryThe syntax of configuration files is described in L<config(5)>. 13*b077aed3SPierre ProncheryThe commands typically have an option to specify the name of the configuration 14*b077aed3SPierre Proncheryfile, and a section within that file; see the documentation of the 15*b077aed3SPierre Proncheryindividual command for details. 16e71b7053SJung-uk Kim 17*b077aed3SPierre ProncheryThis page uses B<extensions> as the name of the section, when needed 18*b077aed3SPierre Proncheryin examples. 19e71b7053SJung-uk Kim 20*b077aed3SPierre ProncheryEach entry in the extension section takes the form: 21e71b7053SJung-uk Kim 22*b077aed3SPierre Pronchery name = [critical, ]value(s) 23e71b7053SJung-uk Kim 24*b077aed3SPierre ProncheryIf B<critical> is present then the extension will be marked as critical. 25e71b7053SJung-uk Kim 26*b077aed3SPierre ProncheryIf multiple entries are processed for the same extension name, 27*b077aed3SPierre Proncherylater entries override earlier ones with the same name. 28*b077aed3SPierre Pronchery 29*b077aed3SPierre ProncheryThe format of B<values> depends on the value of B<name>, many have a 30*b077aed3SPierre Proncherytype-value pairing where the type and value are separated by a colon. 31*b077aed3SPierre ProncheryThere are four main types of extension: 32*b077aed3SPierre Pronchery 33*b077aed3SPierre Pronchery string 34*b077aed3SPierre Pronchery multi-valued 35*b077aed3SPierre Pronchery raw 36*b077aed3SPierre Pronchery arbitrary 37*b077aed3SPierre Pronchery 38*b077aed3SPierre ProncheryEach is described in the following paragraphs. 39e71b7053SJung-uk Kim 40e71b7053SJung-uk KimString extensions simply have a string which contains either the value itself 41e71b7053SJung-uk Kimor how it is obtained. 42e71b7053SJung-uk Kim 43e71b7053SJung-uk KimMulti-valued extensions have a short form and a long form. The short form 44*b077aed3SPierre Proncheryis a comma-separated list of names and values: 45e71b7053SJung-uk Kim 46e71b7053SJung-uk Kim basicConstraints = critical, CA:true, pathlen:1 47e71b7053SJung-uk Kim 48e71b7053SJung-uk KimThe long form allows the values to be placed in a separate section: 49e71b7053SJung-uk Kim 50*b077aed3SPierre Pronchery [extensions] 51*b077aed3SPierre Pronchery basicConstraints = critical, @basic_constraints 52e71b7053SJung-uk Kim 53*b077aed3SPierre Pronchery [basic_constraints] 54e71b7053SJung-uk Kim CA = true 55e71b7053SJung-uk Kim pathlen = 1 56e71b7053SJung-uk Kim 57e71b7053SJung-uk KimBoth forms are equivalent. 58e71b7053SJung-uk Kim 59*b077aed3SPierre ProncheryIf an extension is multi-value and a field value must contain a comma the long 60*b077aed3SPierre Proncheryform must be used otherwise the comma would be misinterpreted as a field 61*b077aed3SPierre Proncheryseparator. For example: 62e71b7053SJung-uk Kim 63*b077aed3SPierre Pronchery subjectAltName = URI:ldap://somehost.com/CN=foo,OU=bar 64*b077aed3SPierre Pronchery 65*b077aed3SPierre Proncherywill produce an error but the equivalent form: 66*b077aed3SPierre Pronchery 67*b077aed3SPierre Pronchery [extensions] 68*b077aed3SPierre Pronchery subjectAltName = @subject_alt_section 69*b077aed3SPierre Pronchery 70*b077aed3SPierre Pronchery [subject_alt_section] 71*b077aed3SPierre Pronchery subjectAltName = URI:ldap://somehost.com/CN=foo,OU=bar 72*b077aed3SPierre Pronchery 73*b077aed3SPierre Proncheryis valid. 74*b077aed3SPierre Pronchery 75*b077aed3SPierre ProncheryOpenSSL does not support multiple occurrences of the same field within a 76*b077aed3SPierre Proncherysection. In this example: 77*b077aed3SPierre Pronchery 78*b077aed3SPierre Pronchery [extensions] 79*b077aed3SPierre Pronchery subjectAltName = @alt_section 80*b077aed3SPierre Pronchery 81*b077aed3SPierre Pronchery [alt_section] 82*b077aed3SPierre Pronchery email = steve@example.com 83*b077aed3SPierre Pronchery email = steve@example.org 84*b077aed3SPierre Pronchery 85*b077aed3SPierre Proncherywill only recognize the last value. To specify multiple values append a 86*b077aed3SPierre Proncherynumeric identifier, as shown here: 87*b077aed3SPierre Pronchery 88*b077aed3SPierre Pronchery [extensions] 89*b077aed3SPierre Pronchery subjectAltName = @alt_section 90*b077aed3SPierre Pronchery 91*b077aed3SPierre Pronchery [alt_section] 92*b077aed3SPierre Pronchery email.1 = steve@example.com 93*b077aed3SPierre Pronchery email.2 = steve@example.org 94*b077aed3SPierre Pronchery 95*b077aed3SPierre ProncheryThe syntax of raw extensions is defined by the source code that parses 96*b077aed3SPierre Proncherythe extension but should be documened. 97*b077aed3SPierre ProncherySee L</Certificate Policies> for an example of a raw extension. 98*b077aed3SPierre Pronchery 99*b077aed3SPierre ProncheryIf an extension type is unsupported, then the I<arbitrary> extension syntax 100*b077aed3SPierre Proncherymust be used, see the L</ARBITRARY EXTENSIONS> section for more details. 101e71b7053SJung-uk Kim 102e71b7053SJung-uk Kim=head1 STANDARD EXTENSIONS 103e71b7053SJung-uk Kim 104*b077aed3SPierre ProncheryThe following sections describe the syntax of each supported extension. 105*b077aed3SPierre ProncheryThey do not define the semantics of the extension. 106e71b7053SJung-uk Kim 107*b077aed3SPierre Pronchery=head2 Basic Constraints 108e71b7053SJung-uk Kim 109*b077aed3SPierre ProncheryThis is a multi-valued extension which indicates whether a certificate is 110*b077aed3SPierre Proncherya CA certificate. The first value is B<CA> followed by B<TRUE> or 11158f35182SJung-uk KimB<FALSE>. If B<CA> is B<TRUE> then an optional B<pathlen> name followed by a 11258f35182SJung-uk Kimnonnegative value can be included. 113e71b7053SJung-uk Kim 114e71b7053SJung-uk KimFor example: 115e71b7053SJung-uk Kim 116e71b7053SJung-uk Kim basicConstraints = CA:TRUE 117e71b7053SJung-uk Kim 118e71b7053SJung-uk Kim basicConstraints = CA:FALSE 119e71b7053SJung-uk Kim 120*b077aed3SPierre Pronchery basicConstraints = critical, CA:TRUE, pathlen:1 121e71b7053SJung-uk Kim 122*b077aed3SPierre ProncheryA CA certificate I<must> include the B<basicConstraints> name with the B<CA> 123*b077aed3SPierre Proncheryparameter set to B<TRUE>. An end-user certificate must either have B<CA:FALSE> 124*b077aed3SPierre Proncheryor omit the extension entirely. 125*b077aed3SPierre ProncheryThe B<pathlen> parameter specifies the maximum number of CAs that can appear 126*b077aed3SPierre Proncherybelow this one in a chain. A B<pathlen> of zero means the CA cannot sign 127*b077aed3SPierre Proncheryany sub-CA's, and can only sign end-entity certificates. 128e71b7053SJung-uk Kim 129*b077aed3SPierre Pronchery=head2 Key Usage 130e71b7053SJung-uk Kim 131*b077aed3SPierre ProncheryKey usage is a multi-valued extension consisting of a list of names of 132*b077aed3SPierre Proncherythe permitted key usages. The defined values are: C<digitalSignature>, 133*b077aed3SPierre ProncheryC<nonRepudiation>, C<keyEncipherment>, C<dataEncipherment>, C<keyAgreement>, 134*b077aed3SPierre ProncheryC<keyCertSign>, C<cRLSign>, C<encipherOnly>, and C<decipherOnly>. 135e71b7053SJung-uk Kim 136e71b7053SJung-uk KimExamples: 137e71b7053SJung-uk Kim 138e71b7053SJung-uk Kim keyUsage = digitalSignature, nonRepudiation 139e71b7053SJung-uk Kim 140e71b7053SJung-uk Kim keyUsage = critical, keyCertSign 141e71b7053SJung-uk Kim 142*b077aed3SPierre Pronchery=head2 Extended Key Usage 143e71b7053SJung-uk Kim 144*b077aed3SPierre ProncheryThis extension consists of a list of values indicating purposes for which 145*b077aed3SPierre Proncherythe certificate public key can be used. 146*b077aed3SPierre ProncheryEach value can be either a short text name or an OID. 147*b077aed3SPierre ProncheryThe following text names, and their intended meaning, are known: 148e71b7053SJung-uk Kim 149*b077aed3SPierre Pronchery Value Meaning according to RFC 5280 etc. 150*b077aed3SPierre Pronchery ----- ---------------------------------- 151*b077aed3SPierre Pronchery serverAuth SSL/TLS WWW Server Authentication 152*b077aed3SPierre Pronchery clientAuth SSL/TLS WWW Client Authentication 153*b077aed3SPierre Pronchery codeSigning Code Signing 154*b077aed3SPierre Pronchery emailProtection E-mail Protection (S/MIME) 155e71b7053SJung-uk Kim timeStamping Trusted Timestamping 156e71b7053SJung-uk Kim OCSPSigning OCSP Signing 157e71b7053SJung-uk Kim ipsecIKE ipsec Internet Key Exchange 158e71b7053SJung-uk Kim msCodeInd Microsoft Individual Code Signing (authenticode) 159e71b7053SJung-uk Kim msCodeCom Microsoft Commercial Code Signing (authenticode) 160e71b7053SJung-uk Kim msCTLSign Microsoft Trust List Signing 161e71b7053SJung-uk Kim msEFS Microsoft Encrypted File System 162e71b7053SJung-uk Kim 163*b077aed3SPierre ProncheryWhile IETF RFC 5280 says that B<id-kp-serverAuth> and B<id-kp-clientAuth> 164*b077aed3SPierre Proncheryare only for WWW use, in practice they are used for all kinds of TLS clients 165*b077aed3SPierre Proncheryand servers, and this is what OpenSSL assumes as well. 166*b077aed3SPierre Pronchery 167e71b7053SJung-uk KimExamples: 168e71b7053SJung-uk Kim 169e71b7053SJung-uk Kim extendedKeyUsage = critical, codeSigning, 1.2.3.4 170*b077aed3SPierre Pronchery 171e71b7053SJung-uk Kim extendedKeyUsage = serverAuth, clientAuth 172e71b7053SJung-uk Kim 173*b077aed3SPierre Pronchery=head2 Subject Key Identifier 174e71b7053SJung-uk Kim 175*b077aed3SPierre ProncheryThe SKID extension specification has a value with three choices. 176*b077aed3SPierre ProncheryIf the value is the word B<none> then no SKID extension will be included. 177*b077aed3SPierre ProncheryIf the value is the word B<hash>, or by default for the B<x509>, B<req>, and 178*b077aed3SPierre ProncheryB<ca> apps, the process specified in RFC 5280 section 4.2.1.2. (1) is followed: 179*b077aed3SPierre ProncheryThe keyIdentifier is composed of the 160-bit SHA-1 hash of the value of the BIT 180*b077aed3SPierre ProncherySTRING subjectPublicKey (excluding the tag, length, and number of unused bits). 181e71b7053SJung-uk Kim 182*b077aed3SPierre ProncheryOtherwise, the value must be a hex string (possibly with C<:> separating bytes) 183*b077aed3SPierre Proncheryto output directly, however, this is strongly discouraged. 184e71b7053SJung-uk Kim 185e71b7053SJung-uk KimExample: 186e71b7053SJung-uk Kim 187e71b7053SJung-uk Kim subjectKeyIdentifier = hash 188e71b7053SJung-uk Kim 189*b077aed3SPierre Pronchery=head2 Authority Key Identifier 190e71b7053SJung-uk Kim 191*b077aed3SPierre ProncheryThe AKID extension specification may have the value B<none> 192*b077aed3SPierre Proncheryindicating that no AKID shall be included. 193*b077aed3SPierre ProncheryOtherwise it may have the value B<keyid> or B<issuer> 194*b077aed3SPierre Proncheryor both of them, separated by C<,>. 195*b077aed3SPierre ProncheryEither or both can have the option B<always>, 196*b077aed3SPierre Proncheryindicated by putting a colon C<:> between the value and this option. 197*b077aed3SPierre ProncheryFor self-signed certificates the AKID is suppressed unless B<always> is present. 198*b077aed3SPierre ProncheryBy default the B<x509>, B<req>, and B<ca> apps behave as if 199*b077aed3SPierre Pronchery"none" was given for self-signed certificates and "keyid, issuer" otherwise. 200e71b7053SJung-uk Kim 201*b077aed3SPierre ProncheryIf B<keyid> is present, an attempt is made to 202*b077aed3SPierre Proncherycopy the subject key identifier (SKID) from the issuer certificate except if 203*b077aed3SPierre Proncherythe issuer certificate is the same as the current one and it is not self-signed. 204*b077aed3SPierre ProncheryThe hash of the public key related to the signing key is taken as fallback 205*b077aed3SPierre Proncheryif the issuer certificate is the same as the current certificate. 206*b077aed3SPierre ProncheryIf B<always> is present but no value can be obtained, an error is returned. 207e71b7053SJung-uk Kim 208*b077aed3SPierre ProncheryIf B<issuer> is present, and in addition it has the option B<always> specified 209*b077aed3SPierre Proncheryor B<keyid> is not present, 210*b077aed3SPierre Proncherythen the issuer DN and serial number are copied from the issuer certificate. 211e71b7053SJung-uk Kim 212e71b7053SJung-uk KimExamples: 213e71b7053SJung-uk Kim 214*b077aed3SPierre Pronchery authorityKeyIdentifier = keyid, issuer 215*b077aed3SPierre Pronchery 216*b077aed3SPierre Pronchery authorityKeyIdentifier = keyid, issuer:always 217*b077aed3SPierre Pronchery 218*b077aed3SPierre Pronchery=head2 Subject Alternative Name 219*b077aed3SPierre Pronchery 220*b077aed3SPierre ProncheryThis is a multi-valued extension that supports several types of name 221*b077aed3SPierre Proncheryidentifier, including 222*b077aed3SPierre ProncheryB<email> (an email address), 223*b077aed3SPierre ProncheryB<URI> (a uniform resource indicator), 224*b077aed3SPierre ProncheryB<DNS> (a DNS domain name), 225*b077aed3SPierre ProncheryB<RID> (a registered ID: OBJECT IDENTIFIER), 226*b077aed3SPierre ProncheryB<IP> (an IP address), 227*b077aed3SPierre ProncheryB<dirName> (a distinguished name), 228*b077aed3SPierre Proncheryand B<otherName>. 229*b077aed3SPierre ProncheryThe syntax of each is described in the following paragraphs. 230*b077aed3SPierre Pronchery 231*b077aed3SPierre ProncheryThe B<email> option has two special values. 232*b077aed3SPierre ProncheryC<copy> will automatically include any email addresses 233*b077aed3SPierre Proncherycontained in the certificate subject name in the extension. 234*b077aed3SPierre ProncheryC<move> will automatically move any email addresses 235*b077aed3SPierre Proncheryfrom the certificate subject name to the extension. 236*b077aed3SPierre Pronchery 237*b077aed3SPierre ProncheryThe IP address used in the B<IP> option can be in either IPv4 or IPv6 format. 238*b077aed3SPierre Pronchery 239*b077aed3SPierre ProncheryThe value of B<dirName> is specifies the configuration section containing 240*b077aed3SPierre Proncherythe distinguished name to use, as a set of name-value pairs. 241*b077aed3SPierre ProncheryMulti-valued AVAs can be formed by prefacing the name with a B<+> character. 242*b077aed3SPierre Pronchery 243*b077aed3SPierre ProncheryThe value of B<otherName> can include arbitrary data associated with an OID; 244*b077aed3SPierre Proncherythe value should be the OID followed by a semicolon and the content in specified 245*b077aed3SPierre Proncheryusing the syntax in L<ASN1_generate_nconf(3)>. 246*b077aed3SPierre Pronchery 247*b077aed3SPierre ProncheryExamples: 248*b077aed3SPierre Pronchery 249*b077aed3SPierre Pronchery subjectAltName = email:copy, email:my@example.com, URI:http://my.example.com/ 250*b077aed3SPierre Pronchery 251e71b7053SJung-uk Kim subjectAltName = IP:192.168.7.1 252*b077aed3SPierre Pronchery 253e71b7053SJung-uk Kim subjectAltName = IP:13::17 254*b077aed3SPierre Pronchery 255*b077aed3SPierre Pronchery subjectAltName = email:my@example.com, RID:1.2.3.4 256*b077aed3SPierre Pronchery 257e71b7053SJung-uk Kim subjectAltName = otherName:1.2.3.4;UTF8:some other identifier 258e71b7053SJung-uk Kim 259*b077aed3SPierre Pronchery [extensions] 260e71b7053SJung-uk Kim subjectAltName = dirName:dir_sect 261e71b7053SJung-uk Kim 262e71b7053SJung-uk Kim [dir_sect] 263e71b7053SJung-uk Kim C = UK 264e71b7053SJung-uk Kim O = My Organization 265e71b7053SJung-uk Kim OU = My Unit 266e71b7053SJung-uk Kim CN = My Name 267e71b7053SJung-uk Kim 268*b077aed3SPierre ProncheryNon-ASCII Email Address conforming the syntax defined in Section 3.3 of RFC 6531 269*b077aed3SPierre Proncheryare provided as otherName.SmtpUTF8Mailbox. According to RFC 8398, the email 270*b077aed3SPierre Proncheryaddress should be provided as UTF8String. To enforce the valid representation in 271*b077aed3SPierre Proncherythe certificate, the SmtpUTF8Mailbox should be provided as follows 272e71b7053SJung-uk Kim 273*b077aed3SPierre Pronchery subjectAltName=@alts 274*b077aed3SPierre Pronchery [alts] 275*b077aed3SPierre Pronchery otherName = 1.3.6.1.5.5.7.8.9;FORMAT:UTF8,UTF8String:nonasciiname.example.com 276e71b7053SJung-uk Kim 277*b077aed3SPierre Pronchery=head2 Issuer Alternative Name 278*b077aed3SPierre Pronchery 279*b077aed3SPierre ProncheryThis extension supports most of the options of subject alternative name; 280*b077aed3SPierre Proncheryit does not support B<email:copy>. 281*b077aed3SPierre ProncheryIt also adds B<issuer:copy> as an allowed value, which copies any subject 282*b077aed3SPierre Proncheryalternative names from the issuer certificate, if possible. 283e71b7053SJung-uk Kim 284e71b7053SJung-uk KimExample: 285e71b7053SJung-uk Kim 286e71b7053SJung-uk Kim issuerAltName = issuer:copy 287e71b7053SJung-uk Kim 288*b077aed3SPierre Pronchery=head2 Authority Info Access 289e71b7053SJung-uk Kim 290*b077aed3SPierre ProncheryThis extension gives details about how to retrieve information that 291*b077aed3SPierre Proncheryrelated to the certificate that the CA makes available. The syntax is 292*b077aed3SPierre ProncheryB<access_id;location>, where B<access_id> is an object identifier 293*b077aed3SPierre Pronchery(although only a few values are well-known) and B<location> has the same 294*b077aed3SPierre Proncherysyntax as subject alternative name (except that B<email:copy> is not supported). 295e71b7053SJung-uk Kim 296*b077aed3SPierre ProncheryPossible values for access_id include B<OCSP> (OCSP responder), 297*b077aed3SPierre ProncheryB<caIssuers> (CA Issuers), 298*b077aed3SPierre ProncheryB<ad_timestamping> (AD Time Stamping), 299*b077aed3SPierre ProncheryB<AD_DVCS> (ad dvcs), 300*b077aed3SPierre ProncheryB<caRepository> (CA Repository). 301e71b7053SJung-uk Kim 302*b077aed3SPierre ProncheryExamples: 303e71b7053SJung-uk Kim 304*b077aed3SPierre Pronchery authorityInfoAccess = OCSP;URI:http://ocsp.example.com/,caIssuers;URI:http://myca.example.com/ca.cer 305e71b7053SJung-uk Kim 306*b077aed3SPierre Pronchery authorityInfoAccess = OCSP;URI:http://ocsp.example.com/ 307e71b7053SJung-uk Kim 308e71b7053SJung-uk Kim=head2 CRL distribution points 309e71b7053SJung-uk Kim 310*b077aed3SPierre ProncheryThis is a multi-valued extension whose values can be either a name-value 311*b077aed3SPierre Proncherypair using the same form as subject alternative name or a single value 312*b077aed3SPierre Proncheryspecifying the section name containing all the distribution point values. 313e71b7053SJung-uk Kim 314*b077aed3SPierre ProncheryWhen a name-value pair is used, a DistributionPoint extension will 315*b077aed3SPierre Proncherybe set with the given value as the fullName field as the distributionPoint 316*b077aed3SPierre Proncheryvalue, and the reasons and cRLIssuer fields will be omitted. 317e71b7053SJung-uk Kim 318*b077aed3SPierre ProncheryWhen a single option is used, the value specifies the section, and that 319*b077aed3SPierre Proncherysection can have the following items: 320e71b7053SJung-uk Kim 321*b077aed3SPierre Pronchery=over 4 322e71b7053SJung-uk Kim 323*b077aed3SPierre Pronchery=item fullname 324e71b7053SJung-uk Kim 325*b077aed3SPierre ProncheryThe full name of the distribution point, in the same format as the subject 326*b077aed3SPierre Proncheryalternative name. 327e71b7053SJung-uk Kim 328*b077aed3SPierre Pronchery=item relativename 329e71b7053SJung-uk Kim 330*b077aed3SPierre ProncheryThe value is taken as a distinguished name fragment that is set as the 331*b077aed3SPierre Proncheryvalue of the nameRelativeToCRLIssuer field. 332*b077aed3SPierre Pronchery 333*b077aed3SPierre Pronchery=item CRLIssuer 334*b077aed3SPierre Pronchery 335*b077aed3SPierre ProncheryThe value must in the same format as the subject alternative name. 336*b077aed3SPierre Pronchery 337*b077aed3SPierre Pronchery=item reasons 338*b077aed3SPierre Pronchery 339*b077aed3SPierre ProncheryA multi-value field that contains the reasons for revocation. The recognized 340*b077aed3SPierre Proncheryvalues are: C<keyCompromise>, C<CACompromise>, C<affiliationChanged>, 341*b077aed3SPierre ProncheryC<superseded>, C<cessationOfOperation>, C<certificateHold>, 342*b077aed3SPierre ProncheryC<privilegeWithdrawn>, and C<AACompromise>. 343*b077aed3SPierre Pronchery 344*b077aed3SPierre Pronchery=back 345*b077aed3SPierre Pronchery 346*b077aed3SPierre ProncheryOnly one of B<fullname> or B<relativename> should be specified. 347e71b7053SJung-uk Kim 348e71b7053SJung-uk KimSimple examples: 349e71b7053SJung-uk Kim 350*b077aed3SPierre Pronchery crlDistributionPoints = URI:http://example.com/myca.crl 351*b077aed3SPierre Pronchery 352*b077aed3SPierre Pronchery crlDistributionPoints = URI:http://example.com/myca.crl, URI:http://example.org/my.crl 353e71b7053SJung-uk Kim 354e71b7053SJung-uk KimFull distribution point example: 355e71b7053SJung-uk Kim 356*b077aed3SPierre Pronchery [extensions] 357e71b7053SJung-uk Kim crlDistributionPoints = crldp1_section 358e71b7053SJung-uk Kim 359e71b7053SJung-uk Kim [crldp1_section] 360*b077aed3SPierre Pronchery fullname = URI:http://example.com/myca.crl 361e71b7053SJung-uk Kim CRLissuer = dirName:issuer_sect 362e71b7053SJung-uk Kim reasons = keyCompromise, CACompromise 363e71b7053SJung-uk Kim 364e71b7053SJung-uk Kim [issuer_sect] 365e71b7053SJung-uk Kim C = UK 366e71b7053SJung-uk Kim O = Organisation 367e71b7053SJung-uk Kim CN = Some Name 368e71b7053SJung-uk Kim 369e71b7053SJung-uk Kim=head2 Issuing Distribution Point 370e71b7053SJung-uk Kim 371*b077aed3SPierre ProncheryThis extension should only appear in CRLs. It is a multi-valued extension 372e71b7053SJung-uk Kimwhose syntax is similar to the "section" pointed to by the CRL distribution 373*b077aed3SPierre Proncherypoints extension. The following names have meaning: 374e71b7053SJung-uk Kim 375*b077aed3SPierre Pronchery=over 4 376e71b7053SJung-uk Kim 377*b077aed3SPierre Pronchery=item fullname 378e71b7053SJung-uk Kim 379*b077aed3SPierre ProncheryThe full name of the distribution point, in the same format as the subject 380*b077aed3SPierre Proncheryalternative name. 381*b077aed3SPierre Pronchery 382*b077aed3SPierre Pronchery=item relativename 383*b077aed3SPierre Pronchery 384*b077aed3SPierre ProncheryThe value is taken as a distinguished name fragment that is set as the 385*b077aed3SPierre Proncheryvalue of the nameRelativeToCRLIssuer field. 386*b077aed3SPierre Pronchery 387*b077aed3SPierre Pronchery=item onlysomereasons 388*b077aed3SPierre Pronchery 389*b077aed3SPierre ProncheryA multi-value field that contains the reasons for revocation. The recognized 390*b077aed3SPierre Proncheryvalues are: C<keyCompromise>, C<CACompromise>, C<affiliationChanged>, 391*b077aed3SPierre ProncheryC<superseded>, C<cessationOfOperation>, C<certificateHold>, 392*b077aed3SPierre ProncheryC<privilegeWithdrawn>, and C<AACompromise>. 393*b077aed3SPierre Pronchery 394*b077aed3SPierre Pronchery=item onlyuser, onlyCA, onlyAA, indirectCRL 395*b077aed3SPierre Pronchery 396*b077aed3SPierre ProncheryThe value for each of these names is a boolean. 397*b077aed3SPierre Pronchery 398*b077aed3SPierre Pronchery=back 399e71b7053SJung-uk Kim 400e71b7053SJung-uk KimExample: 401e71b7053SJung-uk Kim 402*b077aed3SPierre Pronchery [extensions] 403e71b7053SJung-uk Kim issuingDistributionPoint = critical, @idp_section 404e71b7053SJung-uk Kim 405e71b7053SJung-uk Kim [idp_section] 406*b077aed3SPierre Pronchery fullname = URI:http://example.com/myca.crl 407e71b7053SJung-uk Kim indirectCRL = TRUE 408e71b7053SJung-uk Kim onlysomereasons = keyCompromise, CACompromise 409e71b7053SJung-uk Kim 410*b077aed3SPierre Pronchery=head2 Certificate Policies 411e71b7053SJung-uk Kim 412*b077aed3SPierre ProncheryThis is a I<raw> extension that supports all of the defined fields of the 413*b077aed3SPierre Proncherycertificate extension. 414e71b7053SJung-uk Kim 415*b077aed3SPierre ProncheryPolicies without qualifiers are specified by giving the OID. 416*b077aed3SPierre ProncheryMultiple policies are comma-separated. For example: 417e71b7053SJung-uk Kim 418e71b7053SJung-uk Kim certificatePolicies = 1.2.4.5, 1.1.3.4 419e71b7053SJung-uk Kim 420*b077aed3SPierre ProncheryTo include policy qualifiers, use the "@section" syntax to point to a 421*b077aed3SPierre Proncherysection that specifies all the information. 422e71b7053SJung-uk Kim 423e71b7053SJung-uk KimThe section referred to must include the policy OID using the name 424*b077aed3SPierre ProncheryB<policyIdentifier>. cPSuri qualifiers can be included using the syntax: 425e71b7053SJung-uk Kim 426e71b7053SJung-uk Kim CPS.nnn = value 427e71b7053SJung-uk Kim 428*b077aed3SPierre Proncherywhere C<nnn> is a number. 429*b077aed3SPierre Pronchery 430e71b7053SJung-uk KimuserNotice qualifiers can be set using the syntax: 431e71b7053SJung-uk Kim 432e71b7053SJung-uk Kim userNotice.nnn = @notice 433e71b7053SJung-uk Kim 434e71b7053SJung-uk KimThe value of the userNotice qualifier is specified in the relevant section. 435*b077aed3SPierre ProncheryThis section can include B<explicitText>, B<organization>, and B<noticeNumbers> 436e71b7053SJung-uk Kimoptions. explicitText and organization are text strings, noticeNumbers is a 437e71b7053SJung-uk Kimcomma separated list of numbers. The organization and noticeNumbers options 438*b077aed3SPierre Pronchery(if included) must BOTH be present. Some software might require 439*b077aed3SPierre Proncherythe B<ia5org> option at the top level; this changes the encoding from 440*b077aed3SPierre ProncheryDisplaytext to IA5String. 441e71b7053SJung-uk Kim 442e71b7053SJung-uk KimExample: 443e71b7053SJung-uk Kim 444*b077aed3SPierre Pronchery [extensions] 445e71b7053SJung-uk Kim certificatePolicies = ia5org, 1.2.3.4, 1.5.6.7.8, @polsect 446e71b7053SJung-uk Kim 447e71b7053SJung-uk Kim [polsect] 448e71b7053SJung-uk Kim policyIdentifier = 1.3.5.8 449*b077aed3SPierre Pronchery CPS.1 = "http://my.host.example.com/" 450*b077aed3SPierre Pronchery CPS.2 = "http://my.your.example.com/" 451e71b7053SJung-uk Kim userNotice.1 = @notice 452e71b7053SJung-uk Kim 453e71b7053SJung-uk Kim [notice] 454e71b7053SJung-uk Kim explicitText = "Explicit Text Here" 455e71b7053SJung-uk Kim organization = "Organisation Name" 456e71b7053SJung-uk Kim noticeNumbers = 1, 2, 3, 4 457e71b7053SJung-uk Kim 458*b077aed3SPierre ProncheryThe character encoding of explicitText can be specified by prefixing the 459*b077aed3SPierre Proncheryvalue with B<UTF8>, B<BMP>, or B<VISIBLE> followed by colon. For example: 460e71b7053SJung-uk Kim 461e71b7053SJung-uk Kim [notice] 462e71b7053SJung-uk Kim explicitText = "UTF8:Explicit Text Here" 463e71b7053SJung-uk Kim 464e71b7053SJung-uk Kim=head2 Policy Constraints 465e71b7053SJung-uk Kim 466e71b7053SJung-uk KimThis is a multi-valued extension which consisting of the names 467e71b7053SJung-uk KimB<requireExplicitPolicy> or B<inhibitPolicyMapping> and a non negative integer 468e71b7053SJung-uk Kimvalue. At least one component must be present. 469e71b7053SJung-uk Kim 470e71b7053SJung-uk KimExample: 471e71b7053SJung-uk Kim 472e71b7053SJung-uk Kim policyConstraints = requireExplicitPolicy:3 473e71b7053SJung-uk Kim 474e71b7053SJung-uk Kim=head2 Inhibit Any Policy 475e71b7053SJung-uk Kim 476e71b7053SJung-uk KimThis is a string extension whose value must be a non negative integer. 477e71b7053SJung-uk Kim 478e71b7053SJung-uk KimExample: 479e71b7053SJung-uk Kim 480e71b7053SJung-uk Kim inhibitAnyPolicy = 2 481e71b7053SJung-uk Kim 482e71b7053SJung-uk Kim=head2 Name Constraints 483e71b7053SJung-uk Kim 484*b077aed3SPierre ProncheryThis is a multi-valued extension. The name should 485e71b7053SJung-uk Kimbegin with the word B<permitted> or B<excluded> followed by a B<;>. The rest of 486*b077aed3SPierre Proncherythe name and the value follows the syntax of subjectAltName except 487*b077aed3SPierre ProncheryB<email:copy> 488e71b7053SJung-uk Kimis not supported and the B<IP> form should consist of an IP addresses and 489e71b7053SJung-uk Kimsubnet mask separated by a B</>. 490e71b7053SJung-uk Kim 491e71b7053SJung-uk KimExamples: 492e71b7053SJung-uk Kim 493e71b7053SJung-uk Kim nameConstraints = permitted;IP:192.168.0.0/255.255.0.0 494e71b7053SJung-uk Kim 495*b077aed3SPierre Pronchery nameConstraints = permitted;email:.example.com 496e71b7053SJung-uk Kim 497e71b7053SJung-uk Kim nameConstraints = excluded;email:.com 498e71b7053SJung-uk Kim 499e71b7053SJung-uk Kim=head2 OCSP No Check 500e71b7053SJung-uk Kim 501*b077aed3SPierre ProncheryThis is a string extension. It is parsed, but ignored. 502e71b7053SJung-uk Kim 503e71b7053SJung-uk KimExample: 504e71b7053SJung-uk Kim 505e71b7053SJung-uk Kim noCheck = ignored 506e71b7053SJung-uk Kim 507e71b7053SJung-uk Kim=head2 TLS Feature (aka Must Staple) 508e71b7053SJung-uk Kim 509e71b7053SJung-uk KimThis is a multi-valued extension consisting of a list of TLS extension 510e71b7053SJung-uk Kimidentifiers. Each identifier may be a number (0..65535) or a supported name. 511e71b7053SJung-uk KimWhen a TLS client sends a listed extension, the TLS server is expected to 512e71b7053SJung-uk Kiminclude that extension in its reply. 513e71b7053SJung-uk Kim 514e71b7053SJung-uk KimThe supported names are: B<status_request> and B<status_request_v2>. 515e71b7053SJung-uk Kim 516e71b7053SJung-uk KimExample: 517e71b7053SJung-uk Kim 518e71b7053SJung-uk Kim tlsfeature = status_request 519e71b7053SJung-uk Kim 520e71b7053SJung-uk Kim=head1 DEPRECATED EXTENSIONS 521e71b7053SJung-uk Kim 522e71b7053SJung-uk KimThe following extensions are non standard, Netscape specific and largely 523e71b7053SJung-uk Kimobsolete. Their use in new applications is discouraged. 524e71b7053SJung-uk Kim 525*b077aed3SPierre Pronchery=head2 Netscape String extensions 526e71b7053SJung-uk Kim 527e71b7053SJung-uk KimNetscape Comment (B<nsComment>) is a string extension containing a comment 528e71b7053SJung-uk Kimwhich will be displayed when the certificate is viewed in some browsers. 529*b077aed3SPierre ProncheryOther extensions of this type are: B<nsBaseUrl>, 530e71b7053SJung-uk KimB<nsRevocationUrl>, B<nsCaRevocationUrl>, B<nsRenewalUrl>, B<nsCaPolicyUrl> 531e71b7053SJung-uk Kimand B<nsSslServerName>. 532e71b7053SJung-uk Kim 533e71b7053SJung-uk Kim=head2 Netscape Certificate Type 534e71b7053SJung-uk Kim 535e71b7053SJung-uk KimThis is a multi-valued extensions which consists of a list of flags to be 536e71b7053SJung-uk Kimincluded. It was used to indicate the purposes for which a certificate could 537e71b7053SJung-uk Kimbe used. The basicConstraints, keyUsage and extended key usage extensions are 538e71b7053SJung-uk Kimnow used instead. 539e71b7053SJung-uk Kim 540e71b7053SJung-uk KimAcceptable values for nsCertType are: B<client>, B<server>, B<email>, 541e71b7053SJung-uk KimB<objsign>, B<reserved>, B<sslCA>, B<emailCA>, B<objCA>. 542e71b7053SJung-uk Kim 543e71b7053SJung-uk Kim=head1 ARBITRARY EXTENSIONS 544e71b7053SJung-uk Kim 545e71b7053SJung-uk KimIf an extension is not supported by the OpenSSL code then it must be encoded 546e71b7053SJung-uk Kimusing the arbitrary extension format. It is also possible to use the arbitrary 547e71b7053SJung-uk Kimformat for supported extensions. Extreme care should be taken to ensure that 548e71b7053SJung-uk Kimthe data is formatted correctly for the given extension type. 549e71b7053SJung-uk Kim 550e71b7053SJung-uk KimThere are two ways to encode arbitrary extensions. 551e71b7053SJung-uk Kim 552e71b7053SJung-uk KimThe first way is to use the word ASN1 followed by the extension content 553e71b7053SJung-uk Kimusing the same syntax as L<ASN1_generate_nconf(3)>. 554e71b7053SJung-uk KimFor example: 555e71b7053SJung-uk Kim 556*b077aed3SPierre Pronchery [extensions] 557e71b7053SJung-uk Kim 1.2.3.4 = critical, ASN1:UTF8String:Some random data 558*b077aed3SPierre Pronchery 1.2.3.4.1 = ASN1:SEQUENCE:seq_sect 559e71b7053SJung-uk Kim 560e71b7053SJung-uk Kim [seq_sect] 561e71b7053SJung-uk Kim field1 = UTF8:field1 562e71b7053SJung-uk Kim field2 = UTF8:field2 563e71b7053SJung-uk Kim 564e71b7053SJung-uk KimIt is also possible to use the word DER to include the raw encoded data in any 565e71b7053SJung-uk Kimextension. 566e71b7053SJung-uk Kim 567e71b7053SJung-uk Kim 1.2.3.4 = critical, DER:01:02:03:04 568*b077aed3SPierre Pronchery 1.2.3.4.1 = DER:01020304 569e71b7053SJung-uk Kim 570e71b7053SJung-uk KimThe value following DER is a hex dump of the DER encoding of the extension 571e71b7053SJung-uk KimAny extension can be placed in this form to override the default behaviour. 572e71b7053SJung-uk KimFor example: 573e71b7053SJung-uk Kim 574e71b7053SJung-uk Kim basicConstraints = critical, DER:00:01:02:03 575e71b7053SJung-uk Kim 576da327cd2SJung-uk Kim=head1 WARNINGS 577e71b7053SJung-uk Kim 578e71b7053SJung-uk KimThere is no guarantee that a specific implementation will process a given 579e71b7053SJung-uk Kimextension. It may therefore be sometimes possible to use certificates for 580e71b7053SJung-uk Kimpurposes prohibited by their extensions because a specific application does 581e71b7053SJung-uk Kimnot recognize or honour the values of the relevant extensions. 582e71b7053SJung-uk Kim 583e71b7053SJung-uk KimThe DER and ASN1 options should be used with caution. It is possible to create 584*b077aed3SPierre Proncheryinvalid extensions if they are not used carefully. 585e71b7053SJung-uk Kim 586e71b7053SJung-uk Kim=head1 SEE ALSO 587e71b7053SJung-uk Kim 588*b077aed3SPierre ProncheryL<openssl-req(1)>, L<openssl-ca(1)>, L<openssl-x509(1)>, 589e71b7053SJung-uk KimL<ASN1_generate_nconf(3)> 590e71b7053SJung-uk Kim 591e71b7053SJung-uk Kim=head1 COPYRIGHT 592e71b7053SJung-uk Kim 593*b077aed3SPierre ProncheryCopyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved. 594e71b7053SJung-uk Kim 595*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 596e71b7053SJung-uk Kimthis file except in compliance with the License. You can obtain a copy 597e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at 598e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>. 599e71b7053SJung-uk Kim 600e71b7053SJung-uk Kim=cut 601