Lars Strojny
A keks * initial commit
Lars Strojny commited 8c4e5b8 at 2006-12-17 11:28:02
self-cert.jabberd-2.sh
#!/bin/bash
######
#
# Generate a certificate and key with no passphrase.
#
######
OPENSSL=/usr/bin/openssl
## Remove existing temporary private key
test -f /tmp/privkey.pem && rm -f /tmp/privkey.pem
## Remove existing private key
test -f /etc/jabberd/gentoo.pem && rm -f /etc/jabberd/gentoo.pem
## This generates the cert and key
$OPENSSL req -new -x509 -newkey rsa:2048 -keyout /tmp/privkey.pem -out /etc/jabberd/gentoo.pem
## This will remove the passphrase
$OPENSSL rsa -in /tmp/privkey.pem -out /tmp/privkey.pem
## Put it all together
cat /tmp/privkey.pem >> /etc/jabberd/gentoo.pem
## Cleanup
rm -f /tmp/privkey.pem
echo ""
echo "Your new key is /etc/jabberd/gentoo.pem"
echo ""
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX