mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* g10.c (main): Show errors for failure in export, send-keys, recv-keys,
and refresh-keys. * keyserver.c (keyserver_work): Range check the TCP port for HKP. * options.h, g10.c (main): Give algorithm warnings for algorithms chosen against the --pgpX and --openpgp rules. * keydb.h, pkclist.c (algo_available): Make TIGER192 invalid in --openpgp mode. * sign.c (sign_file), pkclist.c (algo_available): Allow passing a hint of 0.
This commit is contained in:
parent
1db0d1e0a2
commit
879014e14b
7 changed files with 165 additions and 55 deletions
|
@ -194,6 +194,11 @@ parse_keyserver_uri(char *uri,const char *configname,unsigned int configlineno)
|
|||
|
||||
ch++;
|
||||
}
|
||||
|
||||
/* It would seem to be reasonable to limit the range of the
|
||||
ports to values between 1-65535, but RFC 1738 and 1808
|
||||
imply there is no limit. Of course, the real world has
|
||||
limits. */
|
||||
}
|
||||
|
||||
/* (any path part of the URI is discarded for now as no keyserver
|
||||
|
@ -679,6 +684,10 @@ keyserver_work(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,int count)
|
|||
log_error(_("no keyserver known (use option --keyserver)\n"));
|
||||
return G10ERR_BAD_URI;
|
||||
}
|
||||
else if(opt.keyserver_port && (strlen(opt.keyserver_port)>5
|
||||
|| atoi(opt.keyserver_port)<1
|
||||
|| atoi(opt.keyserver_port)>65535))
|
||||
return G10ERR_BAD_URI;
|
||||
else
|
||||
{
|
||||
void *stats_handle = import_new_stats_handle ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue