Since the upgrade to gpg 2.2.19, gpgme's tests/json/t-json fails.
It appears to fail because of changes to the json output when asking for secret keys Alpha and Bravo.
With gpg 2.2.19 installed, the test appears to fail for all versions of gpgme, from the current git master, all the way back to gpgme commit 88b7221eb737a3102ec61ea385990b7ea7ef2b30, when the json test was originally introduced.
I did a bit of digging into the cause of this, and it looks like there are two relevant differences:
- earlier versions of gpg were emitting a # in field 15 for keys that it didn't have any secret key for; this caused gpgme-json to emit '"secret": true' incorrectly. 2.2.19 appears to have corrected that misbehavior, so gpgme-json is now emitting '"secret": false', as it should.
I propose to fix this by correcting the gpgme-json test to reflect reality.
- earlier versions of gpg were emitting keygrips for keys that it didn't have any secret key for, but 2.2.19 only emits keygrips for all keys (secret and non-secret alike) when deliberately supplied with --with-keygrip.
I propose to fix this by having gpgme always send --with-keygrip when it is listing keys. This doesn't appear to break any existing tests.
I'll submit a patch series shortly.