#!/bin/sh
# For generate the cert and key with no passphrase run 
# this script by Thomas Muldowney <temas@box5.net>
# For more details see http://docs.jabber.org/general/html/faq.html#AEN350

OPENSSL=/usr/bin/openssl

## This generates the cert and key
$OPENSSL req -new -x509 -newkey rsa:1024 -keyout privkey.pem -out key.pem
## This will remove the passphrase
$OPENSSL rsa -in privkey.pem -out privkey.pem
## Put it all together
cat privkey.pem >> key.pem
## Cleanup
rm privkey.pem
