blob: 2c984fd9dde4a20d9c779b3d71289a9c3bbedda6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
######
#
# Generate a certificate and key with no passphrase.
#
######
OPENSSL=/usr/bin/openssl
## This generates the cert and key
$OPENSSL req -new -x509 -newkey rsa:1024 -keyout /tmp/privkey.pem -out /etc/ejabberd/ssl.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/ejabberd/ssl.pem
## Cleanup
rm /tmp/privkey.pem
echo ""
echo "Your new key is /etc/ejabberd/ssl.pem"
echo ""
|