Date: 2007dec11
OS: Linux
Q. How do I make a self-signed certificate with no password?
A. This script does the trick:
#!/bin/sh
usage()
{
echo 'Usage: makecert <hostname>' >&2
exit 1
}
if [ $# -ne 1 ]; then
usage
fi
HOST=$1
openssl genrsa 1024 > $HOST.key
chmod 400 $HOST.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key $HOST.key > $HOST.cert
cat $HOST.cert $HOST.key > $HOST.pem
chmod 400 $HOST.pem
You might want to save the certificate in /etc/pki/tls/certs
| What this info useful to you? You can donate to say thanks |
Add a comment
Sign in to add a comment