mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Fix signing messages with S/MIME #259
This commit is contained in:
parent
128e2f6254
commit
4df3766231
7 changed files with 112 additions and 39 deletions
|
|
@ -253,7 +253,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
doSign: false,
|
||||
doEncrypt: false,
|
||||
|
||||
canPgpSign: false,
|
||||
pgpSignKey: false,
|
||||
canPgpEncrypt: false,
|
||||
canMailvelope: false,
|
||||
|
||||
|
|
@ -334,7 +334,10 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
attachmentsInProcessCount: () => this.attachmentsInProcess.length,
|
||||
isDraft: () => this.draftsFolder() && this.draftUid(),
|
||||
|
||||
canSign: () => this.canPgpSign() | this.canSMimeSign(),
|
||||
canSign: () => {
|
||||
let s = this.canSMimeSign();
|
||||
return this.pgpSignKey() || s;
|
||||
},
|
||||
canEncrypt: () => this.canPgpEncrypt() | this.canSMimeEncrypt(),
|
||||
|
||||
identitiesOptions: () =>
|
||||
|
|
@ -365,14 +368,14 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
},
|
||||
|
||||
from: value => {
|
||||
this.canPgpSign(false);
|
||||
this.pgpSignKey(false);
|
||||
value = getEmail(value);
|
||||
value && PgpUserStore.getKeyForSigning(value).then(result => {
|
||||
console.log({
|
||||
email: value,
|
||||
canPgpSign:result
|
||||
pgpSignKey:result
|
||||
});
|
||||
this.canPgpSign(result)
|
||||
this.pgpSignKey(result)
|
||||
});
|
||||
this.initPgpEncrypt();
|
||||
},
|
||||
|
|
@ -1458,7 +1461,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
linkedData: []
|
||||
},
|
||||
recipients = draft ? [identity.email()] : this.allRecipients(),
|
||||
sign = !draft && this.doSign() && (this.canPgpSign() || this.canSMimeSign()),
|
||||
sign = !draft && this.doSign() && (this.pgpSignKey() || this.canSMimeSign()),
|
||||
encrypt = this.doEncrypt() && (this.canPgpEncrypt() || this.canSMimeEncrypt()),
|
||||
isHtml = this.oEditor.isHtml();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue