openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar