2fbf20490b73ad0f4b62f2bb971cf9a77bb4c2a3
[openssl.git] / demos / certs / ca.cnf
1 #
2 # OpenSSL example configuration file for automated certificate creation.
3 #
4
5 # This definition stops the following lines choking if HOME or CN
6 # is undefined.
7 HOME                    = .
8 CN                      = "Not Defined"
9 default_ca              = ca
10
11 ####################################################################
12 [ req ]
13 default_bits            = 1024
14 default_keyfile         = privkey.pem
15 # Don't prompt for fields: use those in section directly
16 prompt                  = no
17 distinguished_name      = req_distinguished_name
18 x509_extensions = v3_ca # The extensions to add to the self signed cert
19 string_mask = utf8only
20
21 # req_extensions = v3_req # The extensions to add to a certificate request
22
23 [ req_distinguished_name ]
24 countryName                     = UK
25
26 organizationName                = OpenSSL Group
27 # Take CN from environment so it can come from a script.
28 commonName                      = $ENV::CN
29
30 [ usr_cert ]
31
32 # These extensions are added when 'ca' signs a request for an end entity
33 # certificate
34
35 basicConstraints=critical, CA:FALSE
36 keyUsage=critical, nonRepudiation, digitalSignature, keyEncipherment
37
38 # PKIX recommendations harmless if included in all certificates.
39 subjectKeyIdentifier=hash
40 authorityKeyIdentifier=keyid
41 # OCSP responder certificate
42 [ ocsp_cert ]
43
44 basicConstraints=critical, CA:FALSE
45 keyUsage=critical, nonRepudiation, digitalSignature, keyEncipherment
46
47 # PKIX recommendations harmless if included in all certificates.
48 subjectKeyIdentifier=hash
49 authorityKeyIdentifier=keyid
50 extendedKeyUsage=OCSPSigning
51
52 [ dh_cert ]
53
54 # These extensions are added when 'ca' signs a request for an end entity
55 # DH certificate
56
57 basicConstraints=critical, CA:FALSE
58 keyUsage=critical, keyAgreement
59
60 # PKIX recommendations harmless if included in all certificates.
61 subjectKeyIdentifier=hash
62 authorityKeyIdentifier=keyid
63
64 [ v3_ca ]
65
66
67 # Extensions for a typical CA
68
69 # PKIX recommendation.
70
71 subjectKeyIdentifier=hash
72 authorityKeyIdentifier=keyid:always
73 basicConstraints = critical,CA:true
74 keyUsage = critical, cRLSign, keyCertSign
75
76 # Minimal CA entry to allow generation of CRLs.
77 [ca]
78 database=index.txt
79 crlnumber=crlnum.txt