fix: [S/MIME] don't sign e-mails if no signing key is set

- fixes e-mails not going out on instances where no signing key was provided
pull/6858/head
iglocska 2021-01-05 08:55:58 +01:00
parent 68596db5be
commit f5157ddba3
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 5 additions and 3 deletions

View File

@ -446,7 +446,9 @@ class SendEmail
}
if (!$canEncryptGpg && $canEncryptSmime) {
$this->signBySmime($email);
if (!empty(Configure::read('SMIME.cert_public_sign')) && !empty(Configure::read('SMIME.key_sign'))) {
$this->signBySmime($email);
}
$this->encryptBySmime($email, $user['User']['certif_public']);
$encrypted = true;
}