mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
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>
This commit is contained in:
parent
c7389ae90f
commit
2c3e67430d
@ -284,7 +284,7 @@ format_keyid (u32 *keyid, int format, char *buffer, int len)
|
||||
if (format == KF_DEFAULT)
|
||||
format = opt.keyid_format;
|
||||
if (format == KF_DEFAULT)
|
||||
format = KF_0xLONG;
|
||||
format = KF_SHORT;
|
||||
|
||||
switch (format)
|
||||
{
|
||||
@ -324,7 +324,11 @@ format_keyid (u32 *keyid, int format, char *buffer, int len)
|
||||
size_t
|
||||
keystrlen(void)
|
||||
{
|
||||
switch(opt.keyid_format)
|
||||
int format = opt.keyid_format;
|
||||
if (format == KF_DEFAULT)
|
||||
format = KF_SHORT;
|
||||
|
||||
switch(format)
|
||||
{
|
||||
case KF_SHORT:
|
||||
return 8;
|
||||
|
Loading…
x
Reference in New Issue
Block a user