To reproduce:
- Start with an empty GNUPGHOME. Import a public pgp Key in Kleopatra.
That's it. You have now got a keybox that can be read by gnupg but not by gpgsm
or kbxutil.
gpgsm -k leads to error "Invalid argument"
The invalid argument comes from kbx/keybox-file.c
/* Seek forward so that the caller may choose to ignore this record. */ if (fseek (fp, imagelen-5, SEEK_CUR)) return gpg_error_from_syserror ();
Where imagelen is: 18446744071981567236
(Always the same number in three different tests)
Attached you find such a pubring.
I was unable to reproduce this without Kleopatra yet. Probably the keylisting
that kleopatra runs after an import is a problem (again). But I think it
shouldn't be and regardless of kleopatras involvement it's imo a bug that such a
keybox can be created.