mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
S/MIME don't post identity key and certificate, just fetch from server
This commit is contained in:
parent
4006dd38f8
commit
574fd820a6
3 changed files with 25 additions and 12 deletions
|
|
@ -69,7 +69,7 @@ export const GnuPGUserStore = new class {
|
|||
}
|
||||
};
|
||||
if (isPrivate) {
|
||||
key.password = async (btnTxt = 'CRYPTO/SIGN') => {
|
||||
key.password = async btnTxt => {
|
||||
const pass = await Passphrases.ask(key,
|
||||
'GnuPG key<br>' + key.id + ' ' + key.emails[0],
|
||||
btnTxt
|
||||
|
|
@ -228,7 +228,7 @@ export const GnuPGUserStore = new class {
|
|||
}
|
||||
|
||||
async sign(privateKey) {
|
||||
return await privateKey.password();
|
||||
return await privateKey.password('CRYPTO/SIGN');
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1561,12 +1561,13 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
if ('S/MIME' == signOptions[i][0]) {
|
||||
// TODO: sign in PHP fails
|
||||
params.signCertificate = identity.smimeCertificate();
|
||||
params.signPrivateKey = identity.smimeKey();
|
||||
params.sign = 'S/MIME';
|
||||
// params.signCertificate = identity.smimeCertificate();
|
||||
// params.signPrivateKey = identity.smimeKey();
|
||||
if (identity.smimeKeyEncrypted()) {
|
||||
const pass = await Passphrases.ask(identity,
|
||||
i18n('SMIME/PRIVATE_KEY_OF', {EMAIL: identity.email()}),
|
||||
'CRYPTO/DECRYPT'
|
||||
'CRYPTO/SIGN'
|
||||
);
|
||||
if (null != pass) {
|
||||
params.signPassphrase = pass.password;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue