From ce0379d999039131c86dc0bb83e9b8edfee1c7d4 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Tue, 17 Jul 2018 11:07:49 +0200 Subject: [PATCH] js: fix getkeys with locate option -- * src/Keyring.js: As locate will not work with the "secret" option, the first message cannot be reused, thus a new one must be created here --- lang/js/src/Keyring.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lang/js/src/Keyring.js b/lang/js/src/Keyring.js index cefc8123..f2a71389 100644 --- a/lang/js/src/Keyring.js +++ b/lang/js/src/Keyring.js @@ -68,8 +68,10 @@ export class GPGME_Keyring { let secondrequest; if (prepare_sync === true) { secondrequest = function() { - msg.setParameter('secret', true); - return msg.post(); + let msg2 = createMessage('keylist'); + msg2.setParameter('keys', pattern); + msg2.setParameter('secret', true); + return msg2.post(); }; } else { secondrequest = function() {