Added a S/MIME certificates list to User settings #259

This commit is contained in:
the-djmaze 2024-02-19 20:16:37 +01:00
parent a22ae5fcf4
commit 3f08051e37
8 changed files with 172 additions and 219 deletions

View file

@ -1124,7 +1124,7 @@ trait Messages
$detached = true;
$SMIME = new \SnappyMail\SMime\OpenSSL;
$SMIME = $this->SMIME();
$SMIME->setCertificate($sCertificate);
$SMIME->setPrivateKey($sPrivateKey, $sPassphrase);
$sSignature = $SMIME->sign($tmp, $detached);
@ -1186,8 +1186,7 @@ trait Messages
$oMessage->SubParts->Clear();
$oMessage->Attachments()->Clear();
// $SMIME = new \SnappyMail\SMime(/*$homedir*/);
$SMIME = new \SnappyMail\SMime\OpenSSL;
$SMIME = $this->SMIME();
/*
foreach ($aCertificates as $sCertificate) {
$SMIME->addEncryptKey($sCertificate);