mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-26 20:31:06 +01:00
* gpgkeys_hkp.c (get_key, parse_hkp_index): Bring over latest code from
g10/hkp.c. * gpgkeys_ldap.c (get_key): Fix cosmetic URL display problem (extra ":" at the end).
This commit is contained in:
parent
899343542d
commit
0d8006450a
@ -1,3 +1,11 @@
|
|||||||
|
2002-08-19 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* gpgkeys_hkp.c (get_key, parse_hkp_index): Bring over latest code
|
||||||
|
from g10/hkp.c.
|
||||||
|
|
||||||
|
* gpgkeys_ldap.c (get_key): Fix cosmetic URL display problem
|
||||||
|
(extra ":" at the end).
|
||||||
|
|
||||||
2002-08-03 Stefan Bellon <sbellon@sbellon.de>
|
2002-08-03 Stefan Bellon <sbellon@sbellon.de>
|
||||||
|
|
||||||
* gpgkeys_ldap.c: Tidied up RISC OS initializations.
|
* gpgkeys_ldap.c: Tidied up RISC OS initializations.
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
|
|
||||||
int verbose=0,include_disabled=0,include_revoked=0;
|
int verbose=0,include_disabled=0,include_revoked=0;
|
||||||
char *basekeyspacedn=NULL;
|
char *basekeyspacedn=NULL;
|
||||||
char host[80];
|
char host[80]={'\0'};
|
||||||
char portstr[10];
|
char portstr[10]={'\0'};
|
||||||
FILE *input=NULL,*output=NULL,*console=NULL,*server=NULL;
|
FILE *input=NULL,*output=NULL,*console=NULL,*server=NULL;
|
||||||
|
|
||||||
struct keylist
|
struct keylist
|
||||||
@ -290,7 +290,7 @@ int get_key(char *getkey)
|
|||||||
|
|
||||||
if(verbose)
|
if(verbose)
|
||||||
fprintf(console,"gpgkeys: requesting key 0x%s from hkp://%s%s%s\n",
|
fprintf(console,"gpgkeys: requesting key 0x%s from hkp://%s%s%s\n",
|
||||||
getkey,host,portstr?":":"",portstr?portstr:"");
|
getkey,host,portstr[0]?":":"",portstr[0]?portstr:"");
|
||||||
|
|
||||||
err=http_get("get",search);
|
err=http_get("get",search);
|
||||||
if(err!=0)
|
if(err!=0)
|
||||||
@ -404,19 +404,19 @@ int parse_hkp_index(char *line,char **buffer)
|
|||||||
static unsigned int bits,createtime;
|
static unsigned int bits,createtime;
|
||||||
int ret=0;
|
int ret=0;
|
||||||
|
|
||||||
/* printf("Open %d, LINE: %s, uid: %s\n",open,line,uid); */
|
/* printf("Open %d, LINE: %s, uid: %s\n",open,line,uid); */
|
||||||
|
|
||||||
/* Try and catch some bastardization of HKP. If we don't have
|
/* Try and catch some bastardization of HKP. If we don't have
|
||||||
certain unchanging landmarks, we can't reliably parse the
|
certain unchanging landmarks, we can't reliably parse the
|
||||||
response. */
|
response. */
|
||||||
|
|
||||||
if(open && strncasecmp(line,"</pre>",6)!=0 &&
|
if(open && strncasecmp(line,"</pre>",6)!=0 &&
|
||||||
strncasecmp(line,"pub ",5)!=0 &&
|
strncasecmp(line,"pub ",4)!=0 &&
|
||||||
strncasecmp(line," ",5)!=0)
|
strncasecmp(line," ",4)!=0)
|
||||||
{
|
{
|
||||||
free(key);
|
free(key);
|
||||||
free(uid);
|
free(uid);
|
||||||
fprintf(console,"gpgkeys; this keyserver is not fully HKP compatible\n");
|
fprintf(console,"gpgkeys: this keyserver is not fully HKP compatible\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ int parse_hkp_index(char *line,char **buffer)
|
|||||||
ret=1;
|
ret=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strncmp(line," ",5)!=0)
|
if(strncmp(line," ",4)!=0)
|
||||||
{
|
{
|
||||||
revoked=0;
|
revoked=0;
|
||||||
free(key);
|
free(key);
|
||||||
@ -474,7 +474,7 @@ int parse_hkp_index(char *line,char **buffer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strncasecmp(line,"pub ",5)==0)
|
if(strncasecmp(line,"pub ",4)==0)
|
||||||
{
|
{
|
||||||
char *tok,*temp;
|
char *tok,*temp;
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
|
|
||||||
int verbose=0,include_disabled=0,include_revoked=0,include_subkeys=0;
|
int verbose=0,include_disabled=0,include_revoked=0,include_subkeys=0;
|
||||||
char *basekeyspacedn=NULL;
|
char *basekeyspacedn=NULL;
|
||||||
char host[80];
|
char host[80]={'\0'};
|
||||||
char portstr[10];
|
char portstr[10]={'\0'};
|
||||||
char *pgpkeystr="pgpKey";
|
char *pgpkeystr="pgpKey";
|
||||||
FILE *input=NULL,*output=NULL,*console=NULL;
|
FILE *input=NULL,*output=NULL,*console=NULL;
|
||||||
LDAP *ldap=NULL;
|
LDAP *ldap=NULL;
|
||||||
@ -242,7 +242,7 @@ int get_key(char *getkey)
|
|||||||
|
|
||||||
if(verbose)
|
if(verbose)
|
||||||
fprintf(console,"gpgkeys: requesting key 0x%s from ldap://%s%s%s\n",
|
fprintf(console,"gpgkeys: requesting key 0x%s from ldap://%s%s%s\n",
|
||||||
getkey,host,portstr?":":"",portstr?portstr:"");
|
getkey,host,portstr[0]?":":"",portstr[0]?portstr:"");
|
||||||
|
|
||||||
err=ldap_search_s(ldap,basekeyspacedn,
|
err=ldap_search_s(ldap,basekeyspacedn,
|
||||||
LDAP_SCOPE_SUBTREE,search,attrs,0,&res);
|
LDAP_SCOPE_SUBTREE,search,attrs,0,&res);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user