mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 16:26:44 +03:00
More S/MIME changes for #259
This commit is contained in:
parent
a9b60a762f
commit
9a5a5091a1
4 changed files with 20 additions and 4 deletions
|
|
@ -115,16 +115,17 @@ export class MessageModel extends AbstractModel {
|
|||
hasExternals: false,
|
||||
hasTracking: false,
|
||||
|
||||
encrypted: false,
|
||||
|
||||
pgpSigned: null,
|
||||
pgpVerified: null,
|
||||
|
||||
encrypted: false,
|
||||
pgpEncrypted: null,
|
||||
pgpDecrypted: false,
|
||||
|
||||
smimeSigned: null,
|
||||
smimeVerified: null,
|
||||
smimeEncrypted: null,
|
||||
smimeDecrypted: false,
|
||||
|
||||
// rfc8621
|
||||
id: '',
|
||||
|
|
|
|||
|
|
@ -619,6 +619,13 @@ export class MailMessageView extends AbstractViewRight {
|
|||
});
|
||||
}
|
||||
|
||||
smimeDecrypt() {
|
||||
/*
|
||||
// TODO: find private key and certificate to decrypt
|
||||
const oMessage = currentMessage();
|
||||
*/
|
||||
}
|
||||
|
||||
smimeVerify(/*self, event*/) {
|
||||
const message = currentMessage();
|
||||
let data = message.smimeSigned(); // { partId: "1", micAlg: "pgp-sha256" }
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ class Message implements \JsonSerializable
|
|||
'uid' => $this->Uid,
|
||||
'hash' => \md5($this->sFolder . $this->Uid),
|
||||
'subject' => \trim(Utils::Utf8Clear($this->sSubject)),
|
||||
'encrypted' => 'multipart/encrypted' == $this->sContentType || $this->pgpEncrypted,
|
||||
'encrypted' => 'multipart/encrypted' == $this->sContentType || $this->pgpEncrypted || $this->smimeEncrypted,
|
||||
'messageId' => $this->sMessageId,
|
||||
'spamScore' => $this->bIsSpam ? 100 : $this->SpamScore,
|
||||
'spamResult' => $this->sSpamResult,
|
||||
|
|
|
|||
|
|
@ -305,8 +305,16 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div data-bind="visible: message().smimeEncrypted()">
|
||||
<div class="smime-control encrypted" data-bind="css: {success: message().smimeDecrypted()}">
|
||||
<span data-icon="🔒" data-i18n="OPENPGP/ENCRYPTED_MESSAGE"></span>
|
||||
<!-- TODO
|
||||
<button class="btn" data-bind="click: smimeDecrypt" data-i18n="CRYPTO/DECRYPT"></button>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
<div data-bind="visible: message().smimeSigned()">
|
||||
<div class="openpgp-control signed" data-bind="css: {success: message().smimeVerified() && message().smimeVerified().success, error: message().smimeVerified() && !message().smimeVerified().success}">
|
||||
<div class="smime-control signed" data-bind="css: {success: message().smimeVerified() && message().smimeVerified().success, error: message().smimeVerified() && !message().smimeVerified().success}">
|
||||
<span data-icon="✍" data-i18n="SMIME/SIGNED_MESSAGE"></span>
|
||||
<button class="btn" data-bind="click: smimeVerify" data-i18n="CRYPTO/VERIFY"></button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue