mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02: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)
|
if (format == KF_DEFAULT)
|
||||||
format = opt.keyid_format;
|
format = opt.keyid_format;
|
||||||
if (format == KF_DEFAULT)
|
if (format == KF_DEFAULT)
|
||||||
format = KF_0xLONG;
|
format = KF_SHORT;
|
||||||
|
|
||||||
switch (format)
|
switch (format)
|
||||||
{
|
{
|
||||||
@ -324,7 +324,11 @@ format_keyid (u32 *keyid, int format, char *buffer, int len)
|
|||||||
size_t
|
size_t
|
||||||
keystrlen(void)
|
keystrlen(void)
|
||||||
{
|
{
|
||||||
switch(opt.keyid_format)
|
int format = opt.keyid_format;
|
||||||
|
if (format == KF_DEFAULT)
|
||||||
|
format = KF_SHORT;
|
||||||
|
|
||||||
|
switch(format)
|
||||||
{
|
{
|
||||||
case KF_SHORT:
|
case KF_SHORT:
|
||||||
return 8;
|
return 8;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user