diff --git a/dev/Stores/User/GnuPG.js b/dev/Stores/User/GnuPG.js
index f5106588f3..45dc3e7dc0 100644
--- a/dev/Stores/User/GnuPG.js
+++ b/dev/Stores/User/GnuPG.js
@@ -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
' + key.id + ' ' + key.emails[0],
'CRYPTO/'+btnTxt
);
diff --git a/dev/Stores/User/OpenPGP.js b/dev/Stores/User/OpenPGP.js
index df2a1172d3..d61aad1340 100644
--- a/dev/Stores/User/OpenPGP.js
+++ b/dev/Stores/User/OpenPGP.js
@@ -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
' + 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;
}
},
diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js
index e0eee93916..0070b43c4a 100644
--- a/dev/View/Popup/Compose.js
+++ b/dev/View/Popup/Compose.js
@@ -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'
);