Guest User

Untitled

a guest
Jan 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. if [ -z $1 ]; then
  4. echo "You have to provide a common name"
  5. read -p "CN= " COMMON_NAME
  6. else
  7. COMMON_NAME=$1
  8. fi
  9.  
  10. echo "Create cert for CN=$COMMON_NAME"
  11. 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