Skip to content

Commit

Permalink
bugfix: store in Passphrases
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Feb 23, 2024
1 parent 6f33bc2 commit a7041b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions dev/Stores/User/GnuPG.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down
5 changes: 2 additions & 3 deletions dev/Stores/User/OpenPGP.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand All @@ -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;
}
},
Expand Down
3 changes: 1 addition & 2 deletions dev/View/Popup/Compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
Expand Down

0 comments on commit a7041b4

Please sign in to comment.