開発鯖用に毎回 Let's Encrypt で発行するのめんどいので、自分で発行しようと思った
$ openssl genrsa -aes256 2048 > server.key
$ openssl req -new -key server.key > server.csr # Certificate Signing Request
$ openssl x509 -req -days 90 signkey server.key < server.csr > server.crt
$ cat > altNames.txt
subjectAltName = DNS:foo.example.com, DNS:bar.example.com
$ openssl x509 -req -days 90 -signkey server.key -extfile altNames.txt < server.csr > server.crt
$ openssl req -in server.csr -noout -text
$ openssl x509 -in server.crt -noout -text [-dates]