#!/usr/bin/fish # gen CA Root openssl genpkey -algorithm RSA -out self_ca.key -pkeyopt rsa_keygen_bits:4096 openssl req -new -key self_ca.key -out ca.csr -extensions v3_ca -config CA.cnf openssl x509 -req -sha256 -days 365 -in ca.csr -signkey self_ca.key -extfile CA.cnf -out self_ca.crt -extensions v3_ca # gen cert openssl genpkey -algorithm RSA -out jormungandr.key -pkeyopt rsa_keygen_bits:2048 openssl req -new -key jormungandr.key -extensions v3_ca -out jormungandr.csr -config local_cert.cnf openssl x509 -req -sha256 -days 365 -in jormungandr.csr -CAkey self_ca.key -CA self_ca.crt -out jormungandr.crt -extfile local_cert.cnf -extensions v3_ca # cleanup rm self_ca.key ca.csr jormungandr.csr