bugfix: store in Passphrases

This commit is contained in:
the-djmaze
2024-02-23 03:22:29 +01:00
parent 6f33bc23d3
commit a7041b4efb
3 changed files with 4 additions and 7 deletions

View File

@@ -70,8 +70,7 @@ export const GnuPGUserStore = new class {
};
if (isPrivate) {
key.password = async (btnTxt = 'SIGN') => {
const pass = await Passphrases.ask(
key,
const pass = await Passphrases.ask(key,
'GnuPG key<br>' + key.id + ' ' + key.emails[0],
'CRYPTO/'+btnTxt
);

View File

@@ -24,8 +24,7 @@ const
return privateKey.key;
}
const key = privateKey.id,
pass = await Passphrases.ask(
key,
pass = await Passphrases.ask(privateKey,
'OpenPGP.js key<br>' + key + ' ' + privateKey.emails[0],
'CRYPTO/'+btnTxt
);
@@ -35,7 +34,7 @@ const
privateKey: privateKey.key,
passphrase
});
result && pass.remember && Passphrases.set(key, passphrase);
result && pass.remember && Passphrases.set(privateKey, passphrase);
return result;
}
},

View File

@@ -1566,8 +1566,7 @@ export class ComposePopupView extends AbstractViewPopup {
params.signCertificate = identity.smimeCertificate();
params.signPrivateKey = identity.smimeKey();
if (identity.smimeKeyEncrypted()) {
const pass = await Passphrases.ask(
identity.smimeKey(),
const pass = await Passphrases.ask(identity,
i18n('SMIME/PRIVATE_KEY_OF', {EMAIL: identity.email()}),
'CRYPTO/DECRYPT'
);