mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 17:37:02 +03:00
Make better use of SnappyMail\SensitiveString
This commit is contained in:
parent
0f7505baba
commit
7cacc9b503
18 changed files with 84 additions and 147 deletions
|
|
@ -1065,8 +1065,7 @@ trait Messages
|
|||
}
|
||||
}
|
||||
|
||||
$sPassphrase = $this->GetActionParam('signPassphrase', '');
|
||||
$this->logMask($sPassphrase);
|
||||
$oPassphrase = new \SnappyMail\SensitiveString($this->GetActionParam('signPassphrase', ''));
|
||||
|
||||
$sFingerprint = $this->GetActionParam('signFingerprint', '');
|
||||
if ($sFingerprint) {
|
||||
|
|
@ -1084,7 +1083,7 @@ trait Messages
|
|||
$oMessage->SubParts->Clear();
|
||||
$oMessage->Attachments()->Clear();
|
||||
|
||||
$GPG->addSignKey($sFingerprint, $sPassphrase);
|
||||
$GPG->addSignKey($sFingerprint, $oPassphrase);
|
||||
$GPG->setsignmode(GNUPG_SIG_MODE_DETACH);
|
||||
$sSignature = $GPG->signStream($fp);
|
||||
if (!$sSignature) {
|
||||
|
|
@ -1127,7 +1126,7 @@ trait Messages
|
|||
|
||||
$SMIME = $this->SMIME();
|
||||
$SMIME->setCertificate($sCertificate);
|
||||
$SMIME->setPrivateKey($sPrivateKey, $sPassphrase);
|
||||
$SMIME->setPrivateKey($sPrivateKey, $oPassphrase);
|
||||
$sSignature = $SMIME->sign($tmp, $detached);
|
||||
|
||||
if (!$sSignature) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue