mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* options.skel: Use new hkp://subkeys.pgp.net as sample keyserver since
they at least handle subkeys correctly. * options.h, g10.c (main), main.h, keylist.c (show_keyserver_url), mainproc.c (check_sig_and_print), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt, can_handle_critical): Add read-only support for preferred keyserver subpackets. They're basically policy URLs with a different name. Add a verify-option "show-preferred-keyserver" to turn them on and off (on by default, as per stable branch). * g10.c (main): Add "--set-notation" as alias to "--notation-data" this is to make things consistent with --set-policy-url meaning both sigs and certs.
This commit is contained in:
parent
a58ce94d8e
commit
4d3fecee56
8 changed files with 86 additions and 14 deletions
|
@ -162,6 +162,47 @@ show_policy_url(PKT_signature *sig,int indent,int mode)
|
|||
mode=2 for status messages only
|
||||
*/
|
||||
|
||||
void
|
||||
show_keyserver_url(PKT_signature *sig,int indent,int mode)
|
||||
{
|
||||
const byte *p;
|
||||
size_t len;
|
||||
int seq=0,crit;
|
||||
FILE *fp=mode?log_stream():stdout;
|
||||
|
||||
while((p=enum_sig_subpkt(sig->hashed,SIGSUBPKT_PREF_KS,&len,&seq,&crit)))
|
||||
{
|
||||
if(mode!=2)
|
||||
{
|
||||
int i;
|
||||
char *str;
|
||||
|
||||
for(i=0;i<indent;i++)
|
||||
putchar(' ');
|
||||
|
||||
/* This isn't UTF8 as it is a URL(?) */
|
||||
if(crit)
|
||||
str=_("Critical preferred keyserver: ");
|
||||
else
|
||||
str=_("Preferred keyserver: ");
|
||||
if(mode)
|
||||
log_info("%s",str);
|
||||
else
|
||||
printf("%s",str);
|
||||
print_string(fp,p,len,0);
|
||||
fprintf(fp,"\n");
|
||||
}
|
||||
|
||||
/* TODO: put in a status-fd tag for preferred keyservers */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
mode=0 for stdout.
|
||||
mode=1 for log_info + status messages
|
||||
mode=2 for status messages only
|
||||
*/
|
||||
|
||||
void
|
||||
show_notation(PKT_signature *sig,int indent,int mode)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue