Creating a private Root CA and signing a server certificate (with SAN)
Notes for the reader Run all commands from a single working folder. Protect rootCA.key (this is the CA signing key). Do not share it. Clients must trust the Root CA certificate ( rootCA.pem ) or they will still see certificate warnings. Creating Root CA key and certificate 1. Create your own Root CA private key (rootCA.key) Recommended: encrypt the Root CA key with a passphrase. openssl genrsa -aes256 -out rootCA.key 4096 If you do not want a passphrase (not recommended), use: openssl genrsa -out rootCA.key 4096 2. Create openssl.cfg (Root CA certificate config) Create a file called openssl.cfg using Notepad and paste the following. Update C, ST, L, O, OU, CN as needed. Important: The Root CA CN should be a CA name (example: “Company Root CA”), not a device hostname. [req] distinguished_name = req_distinguished_name x509_extensions = v3_ca prompt = no default_md = sha256 [req_distinguished_name] C = CA ST = ON L = Toronto O = Company OU = IT CN = Company Root CA [v3_ca] #...