Enable S/MIME encrypt #259

This commit is contained in:
the-djmaze 2024-02-20 18:29:35 +01:00
parent ca12655e5f
commit e9a63b40c5
5 changed files with 15 additions and 17 deletions

View file

@ -1400,6 +1400,7 @@ export class ComposePopupView extends AbstractViewPopup {
|| SMimeUserStore.find(certificate => email == certificate.emailAddress && certificate.smimeencrypt)
).length : 0;
this.canSMimeEncrypt(length && length === count);
console.log({canSMimeEncrypt:this.canSMimeEncrypt()});
}
async getMessageRequestParams(sSaveFolder, draft)
@ -1537,7 +1538,7 @@ export class ComposePopupView extends AbstractViewPopup {
} else if (this.canSMimeSign()) {
params.signCertificate = identity.smimeCertificate();
params.signPrivateKey = identity.smimeKey();
if (identity.smimeKey().includes('-----BEGIN ENCRYPTED PRIVATE KEY-----')) {
if (identity.smimeKeyEncrypted()) {
const pass = await AskPopupView.password('S/MIME private key', 'CRYPTO/SIGN');
params.signPassphrase = pass?.password;
}