Creating a certificate signing request with CloudFlare's cfssl
tool.
Minimally, you want to specify the hosts, CN, and key properties. For example:
cat <<EOF > csr.json
{
"hosts": ["example.com"],
"CN": "example.com",
"key": {
"algo": "ecdsa",
"size": 256
}
}
EOF
cfssl genkey -initca csr.json | cfssljson -bare example
Note: We are using the name example
for the output files.
The command pipe in the step above produces the output files
example.csr
(certificate signing request)example-key.pem
(private key)example.pem
(certificate)
An installation guide for cfssl
and additional information can be found on the project's Github page.