1#
2# OpenSSL configuration file.
3#
4
5# Establish working directory.
6
7dir					= .
8
9[ ca ]
10default_ca				= CA_default
11
12[ CA_default ]
13serial					= $dir/serial
14database				= $dir/certindex.txt
15new_certs_dir				= $dir/certs
16certificate				= $dir/cacert.pem
17private_key				= $dir/private/cakey.pem
18default_days				= 365
19default_md				= sha256
20preserve				= no
21email_in_dn				= no
22nameopt					= default_ca
23certopt					= default_ca
24policy					= policy_match
25
26[ policy_match ]
27countryName				= match
28stateOrProvinceName			= match
29organizationName			= match
30organizationalUnitName			= optional
31commonName				= supplied
32emailAddress				= optional
33[ usr_cert ]
34[ server_cert ]
35[ req ]
36default_bits				= 4096			# Size of keys
37default_keyfile				= key.pem		# name of generated keys
38default_md				= sha256				# message digest algorithm
39string_mask				= nombstr		# permitted characters
40distinguished_name			= req_distinguished_name
41req_extensions				= v3_req
42
43[ req_distinguished_name ]
44# Variable name				Prompt string
45#-------------------------	  ----------------------------------
460.organizationName			= Organization Name (company)
47organizationalUnitName			= Organizational Unit Name (department, division)
48emailAddress				= Email Address
49emailAddress_max			= 40
50localityName				= Locality Name (city, district)
51stateOrProvinceName			= State or Province Name (full name)
52countryName				= Country Name (2 letter code)
53countryName_min				= 2
54countryName_max				= 2
55commonName				= Common Name (hostname, IP, or your name)
56commonName_max				= 64
57
58# Default values for the above, for consistency and less typing.
59# Variable name				Value
60#------------------------	  ------------------------------
610.organizationName_default		= libwebsockets-test
62localityName_default			= Xiaobitan
63stateOrProvinceName_default		= Taipei
64countryName_default			= TW
65emailAddress				= none@invalid
66
67[ v3_ca ]
68basicConstraints			= CA:TRUE
69subjectKeyIdentifier			= hash
70authorityKeyIdentifier			= keyid:always,issuer:always
71
72[ v3_req ]
73basicConstraints			= CA:FALSE
74subjectKeyIdentifier			= hash
75