Guido Günther <a...@sigxcpu.org> wrote: >> > #4 0x0000556a0f29306f bug_at (gpg) >> > #5 0x0000556a0f243c1e do_we_trust (gpg) >> > #6 0x0000556a0f243fff find_and_check_key (gpg) >> > #7 0x0000556a0f2455b6 find_and_check_key (gpg) >> > #8 0x0000556a0f24b6c2 encrypt_crypt (gpg) >> > #9 0x0000556a0f203563 main (gpg) >> > #10 0x00007fd58eee12e1 __libc_start_main (libc.so.6) >> > #11 0x0000556a0f2054da _start (gpg) [...] > I can trivially reproduce this without having mutt involved like: > > $ gpg --encrypt --armor --always-trust -r > 1A6F3E639A4467E8C3476525DF6D76C44D696F6B > gpg: Ohhhh jeeee: ... this is a bug (../../g10/pkclist.c:417:do_we_trust) > Aborted (core dumped) > > Where the above key is from the debian-keyring package.
Could you please try with --debug=8192 option (debug for key lookup)? Here, I cannot replicate with Debian's gnupg 2.2.1-2. When key search, it failed as expired, and it didn't go the code path to do_we_trust. ==================== $ /usr/bin/gpg --debug=8192 --encrypt --armor --always-trust -r 1A6F3E639A4467E8C3476525DF6D76C44D696F6B gpg: enabled debug flags: lookup gpg: DBG: keydb_search: 1 search descriptions: gpg: DBG: keydb_search 0: FPR20: '1A6F 3E63 9A44 67E8 C347 6525 DF6D 76C4 4D69 6F6B' gpg: DBG: keydb_search: searching keybox (resource 0 of 1) gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => Success gpg: DBG: finish_lookup: checking key 4D696F6B (all)(req_usage=2) gpg: DBG: checking subkey ED764C3A gpg: DBG: subkey has expired gpg: DBG: checking subkey 217028C2 gpg: DBG: usage does not match: want=2 have=1 gpg: DBG: no suitable subkeys found - trying primary gpg: DBG: primary key usage does not match: want=2 have=5 gpg: DBG: no suitable key found - giving up gpg: DBG: keydb_search: 1 search descriptions: gpg: DBG: keydb_search 0: FPR20: '1A6F 3E63 9A44 67E8 C347 6525 DF6D 76C4 4D69 6F6B' gpg: DBG: keydb_search: searching keybox (resource 0 of 1) gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => EOF gpg: 1A6F3E639A4467E8C3476525DF6D76C44D696F6B: skipped: Unusable public key gpg: [stdin]: encryption failed: Unusable public key gpg: secmem usage: 0/65536 bytes in 0 blocks $ ==================== --