roles/common/: Do the rest of the common configuration.
[distorted-ansible] / roles / common / files / pki / openssl.conf
CommitLineData
5fc6de27
MW
1### -*-conf-*-
2###
3### OpenSSL configuration for distorted.org.uk CA.
4
5###--------------------------------------------------------------------------
6### Defaults.
7
8RANDFILE = /dev/random
9db_suffix =
10
11###--------------------------------------------------------------------------
12### Certificate request configuration.
13
14[req]
15default_bits = 3072
16encrypt_key = no
17default_md = sha256
18utf8 = yes
19x509_extensions = ca-extensions
20distinguished_name = req-dn
21prompt = yes
22
23[req-dn]
24
25countryName = "Country name"
26countryName_default = "GB"
27countryName_min = 2
28countryName_max = 2
29
30stateOrProvinceName = "State, province, or county"
31stateOrProvinceName_default = "Cambridgeshire"
32stateOrProvinceName_max = 64
33
34localityName = "Locality (e.g., city)"
35localityName_default = "Cambridge"
36localityName_max = 64
37
38organizationName = "Organization"
39organizationName_default = "distorted.org.uk"
40organizationName_max = 64
41organizationalUnitName = "Organizational unit"
42organizationalUnitName_max = 64
43
44commonName = "Common name"
45commonName_max = 64
46
47emailAddress = "Email address"
48emailAddress_max = 64
49
50###--------------------------------------------------------------------------
51### CA configuration.
52
53[ca]
54default_ca = distorted-ca
55preserve = yes
56
57[distorted-ca]
58default_days = 1825
59default_md = sha256
60unique_subject = no
61email_in_dn = no
62private_key = private/ca.key
63certificate = ca.cert
64database = state/db$ENV::db_suffix
65serial = state/serial
66crlnumber = state/crlnumber
67default_crl_hours = 28
68x509_extensions = tls-server-extensions
69crl_extensions = crl-extensions
70policy = distorted-policy
71name_opt = sep_multiline, esc_ctrl, utf8, dump_nostr, dump_unknown, space_eq, lname, align
72cert_opt = no_header, ext_parse, no_pubkey
73copy_extensions = copy
74
75[distorted-policy]
76countryName = supplied
77stateOrProvinceName = optional
78localityName = optional
79organizationName = supplied
80organizationalUnitName = optional
81commonName = supplied
82emailAddress = optional
83
84[crl-extensions]
85issuerAltName = email:ca@distorted.org.uk
86crlDistributionPoints = URI:http://www.distorted.org.uk/ca/crl
87
88[ca-extensions]
89basicConstraints = critical, CA:TRUE
90keyUsage = critical, keyCertSign
91subjectKeyIdentifier = hash
92subjectAltName = email:ca@distorted.org.uk
93crlDistributionPoints = URI:http://www.distorted.org.uk/ca/crl
94
95[tls-server-extensions]
96basicConstraints = critical, CA:FALSE
97keyUsage = critical, digitalSignature, keyEncipherment
98extendedKeyUsage = serverAuth
99subjectKeyIdentifier = hash
100authorityKeyIdentifier = keyid:always, issuer:always
101issuerAltName = issuer:copy
102crlDistributionPoints = URI:http://www.distorted.org.uk/ca/crl
103
104[tls-client-extensions]
105basicConstraints = critical, CA:FALSE
106keyUsage = critical, digitalSignature
107extendedKeyUsage = clientAuth
108subjectKeyIdentifier = hash
109authorityKeyIdentifier = keyid:always,issuer:always
110issuerAltName = issuer:copy
111subjectAltName = email:copy
112crlDistributionPoints = URI:http://www.distorted.org.uk/ca/crl
113
114###----- That's all, folks --------------------------------------------------