Fix keystrlen to work when OPT.KEYID_FORMAT is KF_DEFAULT.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 9 Dec 2015 18:01:04 +0000 (13:01 -0500)
committerNeal H. Walfield <neal@g10code.com>
Wed, 6 Jan 2016 14:05:21 +0000 (15:05 +0100)
commit2c3e67430d9b523c85c81ae562223fd51e3608cc
tree02653589ae7fdba22ac1554a79bb868d8c1eb762
parentc7389ae90fa4a70766400cc241ff6a45aa750324
Fix keystrlen to work when OPT.KEYID_FORMAT is KF_DEFAULT.

* g10/keyid.c (keystrlen): If opt.keyid_format is KF_DEFAULT unset,
default to KF_SHORT.
(format_keyid): Default to KF_SHORT, not KF_0xLONG.

--
Without this fix, gpgv2 fails with:

gpgv: Ohhhh jeeee: ... this is a bug (keyid.c:342:keystrlen)

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by: Neal H. Walfield <neal@g10code.com>
g10/keyid.c