mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-12 13:16:57 +01:00
Properly handle a "no keys found" case from the internal HKP code
(external HKP is ok). Also, make a COUNT -1 (i.e. streamed) keyserver response a little more efficient. Add --no-allow-non-selfsigned-uid
This commit is contained in:
parent
b8858a3ef1
commit
46ce06d9d9
@ -1,3 +1,12 @@
|
||||
2002-03-18 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* keyserver.c (keyserver_search_prompt): Properly handle a "no
|
||||
keys found" case from the internal HKP code (external HKP is ok).
|
||||
Also, make a COUNT -1 (i.e. streamed) keyserver response a little
|
||||
more efficient.
|
||||
|
||||
* g10.c (main): Add --no-allow-non-selfsigned-uid
|
||||
|
||||
2002-03-17 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* g10.c (main): --openpgp implies --allow-non-selfsigned-uid.
|
||||
|
@ -239,6 +239,7 @@ enum cmd_and_opt_values { aNull = 0,
|
||||
oDisableCipherAlgo,
|
||||
oDisablePubkeyAlgo,
|
||||
oAllowNonSelfsignedUID,
|
||||
oNoAllowNonSelfsignedUID,
|
||||
oAllowFreeformUID,
|
||||
oAllowSecretKeyImport,
|
||||
oEnableSpecialFilenames,
|
||||
@ -500,6 +501,7 @@ static ARGPARSE_OPTS opts[] = {
|
||||
{ oDisableCipherAlgo, "disable-cipher-algo", 2, "@" },
|
||||
{ oDisablePubkeyAlgo, "disable-pubkey-algo", 2, "@" },
|
||||
{ oAllowNonSelfsignedUID, "allow-non-selfsigned-uid", 0, "@" },
|
||||
{ oNoAllowNonSelfsignedUID, "no-allow-non-selfsigned-uid", 0, "@" },
|
||||
{ oAllowFreeformUID, "allow-freeform-uid", 0, "@" },
|
||||
{ oNoLiteral, "no-literal", 0, "@" },
|
||||
{ oSetFilesize, "set-filesize", 20, "@" },
|
||||
@ -1223,6 +1225,7 @@ main( int argc, char **argv )
|
||||
case oNoSigCache: opt.no_sig_cache = 1; break;
|
||||
case oNoSigCreateCheck: opt.no_sig_create_check = 1; break;
|
||||
case oAllowNonSelfsignedUID: opt.allow_non_selfsigned_uid = 1; break;
|
||||
case oNoAllowNonSelfsignedUID: opt.allow_non_selfsigned_uid=0; break;
|
||||
case oAllowFreeformUID: opt.allow_freeform_uid = 1; break;
|
||||
case oNoLiteral: opt.no_literal = 1; break;
|
||||
case oSetFilesize: opt.set_filesize = pargs.r.ret_ulong; break;
|
||||
|
@ -890,7 +890,7 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
||||
if(count<0)
|
||||
{
|
||||
validcount=0;
|
||||
count=1;
|
||||
count=10;
|
||||
}
|
||||
|
||||
desc=m_alloc(count*sizeof(KEYDB_SEARCH_DESC));
|
||||
@ -901,18 +901,9 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
||||
{
|
||||
int rl;
|
||||
|
||||
if(i==count)
|
||||
if(validcount && i%10==0)
|
||||
{
|
||||
count++;
|
||||
desc=m_realloc(desc,count*sizeof(KEYDB_SEARCH_DESC));
|
||||
validcount=0;
|
||||
}
|
||||
|
||||
i++;
|
||||
|
||||
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+1,(i+10<count)?i+10:count,count);
|
||||
if(searchstr)
|
||||
printf(" for \"%s\"",searchstr);
|
||||
printf("\n");
|
||||
@ -922,13 +913,22 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
|
||||
rl=iobuf_read_line(buffer,&line,&buflen,&maxlen);
|
||||
if(rl>0)
|
||||
{
|
||||
if(print_keyinfo(i,line,&desc[i-1])==-1)
|
||||
continue;
|
||||
if(print_keyinfo(i+1,line,&desc[i])==0)
|
||||
{
|
||||
i++;
|
||||
|
||||
if(i==count)
|
||||
{
|
||||
count+=10;
|
||||
desc=m_realloc(desc,count*sizeof(KEYDB_SEARCH_DESC));
|
||||
validcount=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(rl==0 && i==1)
|
||||
if(rl==0 && i==0)
|
||||
{
|
||||
count=0;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user