mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Handle S/MIME encrypt, decrypt, sign and very everywhere #259
This commit is contained in:
parent
44a623543f
commit
5a2d2fd0e5
7 changed files with 85 additions and 48 deletions
|
|
@ -1194,6 +1194,17 @@ trait Messages
|
|||
$oMessage->Attachments()->Clear();
|
||||
|
||||
$SMIME = $this->SMIME();
|
||||
$certificates = $SMIME->certificates();
|
||||
// Load certificates by id
|
||||
foreach ($aCertificates as &$sCertificate) {
|
||||
if (!\str_contains($sCertificate, '-----BEGIN CERTIFICATE-----')) {
|
||||
foreach ($certificates as $certificate) {
|
||||
if ($certificate['id'] === $sCertificate) {
|
||||
$sCertificate = $SMIME->getCertificate($certificate['file']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$sEncrypted = $SMIME->encrypt($tmp, $aCertificates);
|
||||
|
||||
$oPart = new MimePart;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue