mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Only ask S/MIME private key passphrase when it is encrypted #259
This commit is contained in:
parent
f06b6edef5
commit
f5f3a90275
1 changed files with 5 additions and 3 deletions
|
|
@ -1538,8 +1538,10 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
} else if (this.canSMimeSign()) {
|
} else if (this.canSMimeSign()) {
|
||||||
params.signCertificate = identity.smimeCertificate();
|
params.signCertificate = identity.smimeCertificate();
|
||||||
params.signPrivateKey = identity.smimeKey();
|
params.signPrivateKey = identity.smimeKey();
|
||||||
const pass = await AskPopupView.password('S/MIME key', 'CRYPTO/SIGN');
|
if (identity.smimeKey().includes('-----BEGIN ENCRYPTED PRIVATE KEY-----')) {
|
||||||
params.signPassphrase = pass?.password;
|
const pass = await AskPopupView.password('S/MIME private key', 'CRYPTO/SIGN');
|
||||||
|
params.signPassphrase = pass?.password;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (encrypt) {
|
if (encrypt) {
|
||||||
|
|
@ -1555,7 +1557,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
params.encryptFingerprints = JSON.stringify(GnuPGUserStore.getPublicKeyFingerprints(recipients));
|
params.encryptFingerprints = JSON.stringify(GnuPGUserStore.getPublicKeyFingerprints(recipients));
|
||||||
// } else {
|
// } else {
|
||||||
// // S/MIME
|
// // S/MIME
|
||||||
// params.encryptCertificates = '';
|
// params.encryptCertificates = [];
|
||||||
} else {
|
} else {
|
||||||
throw 'Encryption with ' + encrypt + ' not yet implemented';
|
throw 'Encryption with ' + encrypt + ' not yet implemented';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue