henrydenhengst

create selfsigned wildcard certificate

May 30th, 2014
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.42 KB | None | 0 0
  1. #!/bin/bash
  2. mkdir /etc/ssl/wildcard.yourdomain.tld
  3. cd /etc/ssl/wildcard.yourdomain.tld
  4. openssl genrsa 2048 > host.key
  5. openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
  6. # For a wildcard cert enter *.yourdomain.tld for Common Name. All other options can be left blank for defaults
  7. openssl x509 -noout -fingerprint -text < host.cert > host.info
  8. cat host.cert host.key > host.pem
  9. chmod 400 host.key host.pem
Advertisement
Add Comment
Please, Sign In to add comment