mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-10 13:04:23 +01:00
The keyserver search menu should honor --keyid-format
* keyserver.c (print_keyrec): Honor --keyid-format when getting back full fingerprints from the keyserver (the comment in the code was correct, the code was not).
This commit is contained in:
parent
978878b1be
commit
3d0c386011
@ -1,6 +1,6 @@
|
|||||||
/* keyserver.c - generic keyserver code
|
/* keyserver.c - generic keyserver code
|
||||||
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||||
* 2009 Free Software Foundation, Inc.
|
* 2009, 2012 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -505,21 +505,27 @@ print_keyrec(int number,struct keyrec *keyrec)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* However, if it gave us a long keyid, we can honor
|
/* However, if it gave us a long keyid, we can honor
|
||||||
--keyid-format */
|
--keyid-format via keystr(). */
|
||||||
case KEYDB_SEARCH_MODE_LONG_KID:
|
case KEYDB_SEARCH_MODE_LONG_KID:
|
||||||
printf("key %s",keystr(keyrec->desc.u.kid));
|
printf("key %s",keystr(keyrec->desc.u.kid));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* If it gave us a PGP 2.x fingerprint, not much we can do
|
||||||
|
beyond displaying it. */
|
||||||
case KEYDB_SEARCH_MODE_FPR16:
|
case KEYDB_SEARCH_MODE_FPR16:
|
||||||
printf("key ");
|
printf("key ");
|
||||||
for(i=0;i<16;i++)
|
for(i=0;i<16;i++)
|
||||||
printf("%02X",keyrec->desc.u.fpr[i]);
|
printf("%02X",keyrec->desc.u.fpr[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* If we get a modern fingerprint, we have the most
|
||||||
|
flexibility. */
|
||||||
case KEYDB_SEARCH_MODE_FPR20:
|
case KEYDB_SEARCH_MODE_FPR20:
|
||||||
printf("key ");
|
{
|
||||||
for(i=0;i<20;i++)
|
u32 kid[2];
|
||||||
printf("%02X",keyrec->desc.u.fpr[i]);
|
keyid_from_fingerprint(keyrec->desc.u.fpr,20,kid);
|
||||||
|
printf("key %s",keystr(kid));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user