Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Create SSL certificates
- # for LKS Nasional
- #
- DAYS=3650
- OUTFILE=$1-apache.pem
- if [ -z "$1" ]; then
- echo "Usage: $0 [host.domain]"
- exit 10
- fi
- echo "Generate SSL untuk host $1 ..."
- (
- echo "My Country"
- echo "My Region"
- echo "My City"
- echo "My Company"
- echo "My Department"
- echo $1
- echo "webmaster@$1"
- echo
- echo
- ) |
- openssl req -new -nodes -keyout $1.key -out $1.req -days $DAYS
- openssl ca -policy policy_anything -notext -days $DAYS -out $1.crt -infiles $1.req
- chmod go= $1.crt $1.key $1.req
Advertisement
Add Comment
Please, Sign In to add comment