aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog7
-rw-r--r--g10/hkp.c24
-rw-r--r--g10/misc.c2
-rw-r--r--g10/options.skel13
-rw-r--r--g10/pkclist.c4
5 files changed, 45 insertions, 5 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index b93e0b3ca..2a801f962 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,10 @@
+2001-04-23 Werner Koch <[email protected]>
+
+ * hkp.c (hkp_ask_import): Allow to specify a port number for the
+ keyserver. Add a kudge to set the no_shutdown flag.
+ (hkp_export): Ditto.
+ * options.skel: Document the changes
+
2001-04-20 Werner Koch <[email protected]>
* options.skel: Add some more comments.
diff --git a/g10/hkp.c b/g10/hkp.c
index e9428bbef..801c44382 100644
--- a/g10/hkp.c
+++ b/g10/hkp.c
@@ -65,8 +65,19 @@ hkp_ask_import( u32 *keyid )
* down to the import function. Marc told that there is such a
* binary mode ... how?
*/
- sprintf( request, "x-hkp://%s:11371/pks/lookup?op=get&search=0x%08lX",
+ if ( !strncmp (opt.keyserver_name, "x-broken-hkp://", 15) ) {
+ sprintf( request, "x-hkp://%s/pks/lookup?op=get&search=0x%08lX",
+ opt.keyserver_name+15, (ulong)keyid[1] );
+ hflags |= HTTP_FLAG_NO_SHUTDOWN;
+ }
+ else if ( !strncmp (opt.keyserver_name, "x-hkp://", 8) ) {
+ sprintf( request, "%s/pks/lookup?op=get&search=0x%08lX",
opt.keyserver_name, (ulong)keyid[1] );
+ }
+ else {
+ sprintf( request, "x-hkp://%s:11371/pks/lookup?op=get&search=0x%08lX",
+ opt.keyserver_name, (ulong)keyid[1] );
+ }
rc = http_open_document( &hd, request, hflags );
if( rc ) {
log_info(_("can't get key from keyserver: %s\n"),
@@ -141,7 +152,16 @@ hkp_export( STRLIST users )
iobuf_flush_temp( temp );
request = m_alloc( strlen( opt.keyserver_name ) + 100 );
- sprintf( request, "x-hkp://%s:11371/pks/add", opt.keyserver_name );
+ if ( !strncmp (opt.keyserver_name, "x-broken-hkp://", 15) ) {
+ sprintf( request, "x-hkp://%s/pks/add", opt.keyserver_name+15 );
+ hflags |= HTTP_FLAG_NO_SHUTDOWN;
+ }
+ else if ( !strncmp (opt.keyserver_name, "x-hkp://", 8) ) {
+ sprintf( request, "%s/pks/add", opt.keyserver_name );
+ }
+ else {
+ sprintf( request, "x-hkp://%s:11371/pks/add", opt.keyserver_name );
+ }
rc = http_open( &hd, HTTP_REQ_POST, request , hflags );
if( rc ) {
log_error(_("can't connect to `%s': %s\n"),
diff --git a/g10/misc.c b/g10/misc.c
index 53dfd0fac..57d6257ab 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -236,7 +236,7 @@ print_cipher_algo_note( int algo )
if( !did_note ) {
did_note = 1;
log_info(_("this cipher algorithm is deprecated; "
- "please use a more standard one!x\n"));
+ "please use a more standard one!\n"));
}
}
}
diff --git a/g10/options.skel b/g10/options.skel
index ad47c9fa6..f32a9fa08 100644
--- a/g10/options.skel
+++ b/g10/options.skel
@@ -98,9 +98,22 @@ lock-once
# import the key from that server (server do syncronize with each
# other and DNS Round-Robin may give you a random server each time).
# Use "host -l pgp.net | grep www" to figure out a keyserver.
+#
+# If you do not want to use the default port 11371, you can give the
+# name of the keyserver like this:
+# x-hkp://keyserver.example.net:22742
+# If you have problems connecting through a buggy proxy, you can use this:
+# x-broken-hkp://keyserver.example.net:11371
+# But first you should make sure that you have read the man page regarding
+# proxies (--honor-http-proxy)
+# Most users just set the name of the preferred keyserver.
#keyserver wwwkeys.nl.pgp.net
# The environment variable http_proxy is only used when the
# this option is set.
honor-http-proxy
+
+
+
+
diff --git a/g10/pkclist.c b/g10/pkclist.c
index 2fe968988..a80c4c680 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -483,8 +483,8 @@ do_we_trust( PKT_public_key *pk, int *trustlevel )
if( opt.verbose )
log_info("No trust check due to --always-trust option\n");
/* The problem with this, is that EXPIRE can't be checked as
- * this needs to insert a ne key into the trustdb first and
- * we don't want that */
+ * this needs to insert a new key into the trustdb first and
+ * we don't want that - IS this still true? */
return 1;
}