Minimal X.509 certificate authority.
[ca] / openssl.conf
CommitLineData
b294f6b5
MW
1### -*-conf-*-
2###
3### OpenSSL configuration for distorted.org.uk CA.
4
5###--------------------------------------------------------------------------
6### Defaults.
7
8RANDFILE = /dev/urandom
9
10###--------------------------------------------------------------------------
11### Certificate request configuration.
12
13[req]
14default_bits = 3072
15encrypt_key = no
16default_md = sha1
17utf8 = yes
18x509_extensions = ca-extensions
19distinguished_name = req-dn
20prompt = yes
21
22[req-dn]
23
24countryName = "Country name"
25countryName_default = "GB"
26countryName_min = 2
27countryName_max = 2
28
29stateOrProvinceName = "State, province, or county"
30stateOrProvinceName_default = "Cambridgeshire"
31stateOrProvinceName_max = 64
32
33localityName = "Locality (e.g., city)"
34localityName_default = "Cambridge"
35localityName_max = 64
36
37organizationName = "Organization"
38organizationName_default = "distorted.org.uk"
39organizationName_max = 64
40organizationalUnitName = "Organizational unit"
41organizationalUnitName_max = 64
42
43commonName = "Common name"
44commonName_max = 64
45
46emailAddress = "Email address"
47emailAddress_max = 64
48
49###--------------------------------------------------------------------------
50### CA configuration.
51
52[ca]
53default_ca = distorted-ca
54preserve = yes
55
56[distorted-ca]
57default_days = 1825
58default_md = sha1
59unique_subject = no
60email_in_dn = no
61private_key = private/ca.key
62certificate = ca.cert
63database = state/db
64serial = state/serial
65crlnumber = state/crlnumber
66default_crl_days = 7
67new_certs_dir = tmp
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 = match
80organizationalUnitName = optional
81commonName = supplied
82emailAddress = optional
83
84[crl-extensions]
85issuerAltName = email:ca@distorted.org.uk
86crlDistributionPoints=URI:http://www.distorted.org.uk/ca/distorted.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/distorted.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/distorted.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/distorted.crl
113
114###----- That's all, folks --------------------------------------------------