Skip to content

Instantly share code, notes, and snippets.

@jeremysuriel
Created October 17, 2018 13:48
Show Gist options
  • Save jeremysuriel/805e4204b968d1bbadf5069c522c5846 to your computer and use it in GitHub Desktop.
Save jeremysuriel/805e4204b968d1bbadf5069c522c5846 to your computer and use it in GitHub Desktop.
openssl.conf example for CA and chained certificate
dir = .
[ ca ]
default_ca = CA_default
[ CA_default ]
serial = $dir/serial
database = $dir/index.txt
new_certs_dir = $dir/newcerts
certificate = $dir/cacert.pem
private_key = $dir/private/cakey.pem
default_days = 365
default_md = sha256
preserve = no
email_in_dn = no
nameopt = default_ca
certopt = default_ca
policy = policy_match
[ policy_match ]
commonName = supplied
countryName = optional
stateOrProvinceName = optional
localityName = optional
organizationName = optional
organizationalUnitName = optional
emailAddress = optional
[ req ]
default_bits = 2048
default_keyfile = priv.pem
default_md = sha256
distinguished_name = req_distinguished_name
req_extensions = v3_req
encyrpt_key = no
[ req_distinguished_name ]
[ v3_ca ]
basicConstraints = critical,CA:TRUE
subjectKeyIdentifier = hash
[ v3_req ]
basicConstraints = CA:FALSE
subjectKeyIdentifier = hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment