You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
268 B
Bash

function gen_sub() {
local result="${1}"
case $OSTYPE in
msys | win32) result="//XX=x${result}" ;;
esac
echo "$result"
}
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj $(gen_sub '/C=US/CN=example.com') -keyout key.pem -out cert.pem