Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- if [ -z $1 ]; then
- echo "You have to provide a common name"
- read -p "CN= " COMMON_NAME
- else
- COMMON_NAME=$1
- fi
- echo "Create cert for CN=$COMMON_NAME"
- openssl req -x509 -newkey rsa:4096 -keyout $COMMON_NAME.key -out $COMMON_NAME.crt -days 365 -nodes -subj "/CN=$COMMON_NAME"
Add Comment
Please, Sign In to add comment