-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathca.cnf
125 lines (71 loc) · 2.33 KB
/
ca.cnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#
# OpenSSL example configuration file for automated certificate creation.
#
# This definition stops the following lines choking if HOME or CN
# is undefined.
HOME = .
CN = "Not Defined"
ON = "Not Defined"
URINAME = "Not Defined"
URINAME2 = "Not Defined"
URINAME3 = "Not Defined"
pl = "pathlen:0"
default_ca = ca
# Comment out the next line to ignore configuration errors
config_diagnostics = 1
####################################################################
[ req ]
default_bits = 1024
default_keyfile = privkey.pem
# Don't prompt for fields: use those in section directly
prompt = no
distinguished_name = req_distinguished_name
x509_extensions = v3_ca # The extensions to add to the self signed cert
string_mask = utf8only
# req_extensions = v3_req # The extensions to add to a certificate request
[ req_distinguished_name ]
organizationName = $ENV::ON
# Take CN from environment so it can come from a script.
commonName = $ENV::CN
[ usr_cert ]
# These extensions are added when 'ca' signs a request for an end entity
# certificate
basicConstraints=critical,CA:FALSE,pathlen:0
keyUsage=critical,digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always
[ usr_extra_cert ]
# These extensions are added when 'ca' signs a request for an end entity
# certificate
basicConstraints=critical,CA:FALSE,pathlen:0
keyUsage=critical,digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always
subjectAltName= $ENV::URINAME2
[ usr_extra2_cert ]
# These extensions are added when 'ca' signs a request for an end entity
# certificate
basicConstraints=critical,CA:FALSE,pathlen:0
keyUsage=critical,digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always
subjectAltName= $ENV::URINAME3
[ int_cert ]
# These extensions are added when 'intermediate ca ' signs a request for an end entity
# certificate
basicConstraints=critical,CA:true,pathlen:0
keyUsage=critical,keyCertSign
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always
[ v3_ca ]
# Extensions for a typical CA
# PKIX recommendation.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always
basicConstraints = critical, CA:true ,$ENV::pl
keyUsage = critical, keyCertSign
# Minimal CA entry to allow generation of CRLs.
[ca]
database=index.txt
crlnumber=crlnum.txt
private_key = privkey.pem