https://bugs.kde.org/show_bug.cgi?id=458085

--- Comment #58 from michaelk83 <mk.mat...@gmail.com> ---
(In reply to Thiago Macieira from comment #57)
@Thiago, the issue is bigger than just synchronous vs asynchronous. The issue
is that if you use a GPG wallet, with Secret Service provided by KWallet, and
while allowing pinentry to read the key passphrase from Secret Service, what
ends up happening is that KWallet asks for the key passphrase from itself
instead of the user. It's like trying to unlock a safe with the key that's
locked inside that same safe. Not going to work. Even if you make this
asynchronous, you'll just end up with an infinite recursion.

`no-allow-external-cache` is one way to break that cycle, but you're correct
that it's just a workaround. As are all three of the options that I proposed in
comment 36.

In comment 40 I've proposed a simple pseudo-code patch that would automate this
particular workaround and restrict it to only when a wallet is being unlocked.
This has two advantages:
1. It would be handled entirely and automatically by KWallet under the hood, so
users won't need to mess with it or be aware of it.
2. Once the wallet is unlocked, it would still allow other key passphrases to
be stored and retrieved from KWallet via Secret Service.

It's not a perfect solution either, for example there could still be some
timing conditions where things don't work properly, but it's a fairly simple
patch. A proper solution would be for KWallet to handle the pinentry request,
as you suggest, but it's more complicated to implement. It would require
KWallet to implement the Assuan protocol to display a prompt to the user on its
own. This was discussed briefly in comment 29 and 30.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to