mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-23 20:08:04 +01:00
Detect a "no keys found" case even if the keyserver helper program does
not explicitly say how many keys were found. Bug fix - don't report non-revoked keys as revoked in HKP key searches.
This commit is contained in:
parent
8ac8b1525e
commit
393ba4f8a7
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keyserver.c (keyserver_search_prompt): Detect a "no keys found"
|
||||||
|
case even if the helper program does not explicitly say how many
|
||||||
|
keys were found.
|
||||||
|
|
||||||
|
* hkp.c (parse_hkp_index): Bug fix - don't report non-revoked keys
|
||||||
|
as revoked in HKP key searches.
|
||||||
|
|
||||||
2002-02-19 David Shaw <dshaw@jabberwocky.com>
|
2002-02-19 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* hkp.c (parse_hkp_index): Catch corruption in HKP index lines
|
* hkp.c (parse_hkp_index): Catch corruption in HKP index lines
|
||||||
|
@ -281,6 +281,7 @@ parse_hkp_index(IOBUF buffer,char *line)
|
|||||||
|
|
||||||
if(strncmp(line," ",5)!=0)
|
if(strncmp(line," ",5)!=0)
|
||||||
{
|
{
|
||||||
|
revoked=0;
|
||||||
m_free(key);
|
m_free(key);
|
||||||
m_free(uid);
|
m_free(uid);
|
||||||
uid=NULL;
|
uid=NULL;
|
||||||
|
@ -811,8 +811,9 @@ keyserver_search(STRLIST tokens)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Count is just for cosmetics. If it is too small, it will grow
|
/* Count and searchstr are just for cosmetics. If the count is too
|
||||||
safely. If negative it disables the "Key x-y of z" messages. */
|
small, it will grow safely. If negative it disables the "Key x-y
|
||||||
|
of z" messages. */
|
||||||
void
|
void
|
||||||
keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
||||||
{
|
{
|
||||||
@ -823,13 +824,7 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
|||||||
char *answer;
|
char *answer;
|
||||||
|
|
||||||
if(count==0)
|
if(count==0)
|
||||||
{
|
goto notfound;
|
||||||
if(searchstr)
|
|
||||||
log_info(_("key \"%s\" not found on keyserver\n"),searchstr);
|
|
||||||
else
|
|
||||||
log_info(_("key not found on keyserver\n"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(count<0)
|
if(count<0)
|
||||||
{
|
{
|
||||||
@ -857,7 +852,8 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
|||||||
if(validcount && (i-1)%10==0)
|
if(validcount && (i-1)%10==0)
|
||||||
{
|
{
|
||||||
printf("Keys %d-%d of %d",i,(i+9<count)?i+9:count,count);
|
printf("Keys %d-%d of %d",i,(i+9<count)?i+9:count,count);
|
||||||
printf(" for \"%s\"",searchstr);
|
if(searchstr)
|
||||||
|
printf(" for \"%s\"",searchstr);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -871,6 +867,12 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
|||||||
else
|
else
|
||||||
i--;
|
i--;
|
||||||
|
|
||||||
|
if(rl==0 && i==1)
|
||||||
|
{
|
||||||
|
count=0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(i%10==0 || rl==0)
|
if(i%10==0 || rl==0)
|
||||||
{
|
{
|
||||||
answer=cpr_get_no_help("keysearch.prompt",
|
answer=cpr_get_no_help("keysearch.prompt",
|
||||||
@ -896,4 +898,14 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
|||||||
|
|
||||||
m_free(keyids);
|
m_free(keyids);
|
||||||
m_free(line);
|
m_free(line);
|
||||||
|
|
||||||
|
notfound:
|
||||||
|
if(count==0)
|
||||||
|
{
|
||||||
|
if(searchstr)
|
||||||
|
log_info(_("key \"%s\" not found on keyserver\n"),searchstr);
|
||||||
|
else
|
||||||
|
log_info(_("key not found on keyserver\n"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user