mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-06 21:22:19 +03:00
cleanup OpenPGP.js askPassphrase
This commit is contained in:
parent
c99503980f
commit
04083f478a
1 changed files with 4 additions and 4 deletions
|
|
@ -18,14 +18,14 @@ const
|
|||
key.emails.includes(query) || query == key.id || query == key.fingerprint
|
||||
),
|
||||
|
||||
askPassphrase = async (privateKey, btnTxt) =>
|
||||
await AskPopupView.password('OpenPGP.js key<br>' + privateKey.id + ' ' + privateKey.emails[0], 'OPENPGP/'+btnTxt),
|
||||
|
||||
decryptKey = async (privateKey, btnTxt = 'LABEL_SIGN') => {
|
||||
if (privateKey.key.isDecrypted()) {
|
||||
return privateKey.key;
|
||||
}
|
||||
const passphrase = await askPassphrase(privateKey, btnTxt);
|
||||
const passphrase = await AskPopupView.password(
|
||||
'OpenPGP.js key<br>' + privateKey.id + ' ' + privateKey.emails[0],
|
||||
'OPENPGP/'+btnTxt
|
||||
);
|
||||
if (null !== passphrase) {
|
||||
return await openpgp.decryptKey({
|
||||
privateKey: privateKey.key,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue