mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-23 02:27:05 +00:00
change handling of pkcs key format
This commit is contained in:
parent
d64f749e9a
commit
dc6d66cc47
@ -63,10 +63,14 @@ if [ ! -f "$STORAGE_ROOT/mail/dkim/mail.key" ]; then
|
||||
|
||||
# Change format from pkcs#8 to pkcs#1, dkimpy seemingly is not able to handle the #8 format
|
||||
# See bug https://bugs.launchpad.net/dkimpy/+bug/1978835
|
||||
line=$(head -n 1 mail.key)
|
||||
if [ ! "$line" = "-----BEGIN RSA PRIVATE KEY-----" ]; then
|
||||
# Generate pkcs#1 key from the pkcs#8 key
|
||||
openssl pkey -in $STORAGE_ROOT/mail/dkim/mail.key -traditional -out $STORAGE_ROOT/mail/dkim/mail.key.1
|
||||
mv -f $STORAGE_ROOT/mail/dkim/mail.key $STORAGE_ROOT/mail/dkim/mail.key.8
|
||||
cp -f $STORAGE_ROOT/mail/dkim/mail.key.1 $STORAGE_ROOT/mail/dkim/mail.key
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f "$STORAGE_ROOT/mail/dkim/box-ed25519.key" ]; then
|
||||
# Generate ed25519 key
|
||||
|
Loading…
Reference in New Issue
Block a user