#!/bin/sh

# Update temporary RSA and DH keys
# Frederik Vermeulen 2004-05-31 GPL

umask 0077 || exit 0



/usr/bin/openssl genrsa -out /var/qmail/control/rsa2048.new 2048 &&
chmod 600 /var/qmail/control/rsa2048.new &&
chown qmaild:qmail /var/qmail/control/rsa2048.new &&
mv -f /var/qmail/control/rsa2048.new /var/qmail/control/rsa2048.pem
echo

/usr/bin/openssl dhparam -2 -out /var/qmail/control/dh2048.new 2048 &&
chmod 600 /var/qmail/control/dh2048.new &&
chown qmaild:qmail /var/qmail/control/dh2048.new &&
mv -f /var/qmail/control/dh2048.new /var/qmail/control/dh2048.pem
