[svn] GnuPG - r4017 - trunk/g10
svn author dshaw
cvs at cvs.gnupg.org
Wed Feb 22 21:21:01 CET 2006
Author: dshaw
Date: 2006-02-22 21:20:58 +0100 (Wed, 22 Feb 2006)
New Revision: 4017
Modified:
trunk/g10/ChangeLog
trunk/g10/gpg.c
trunk/g10/keyserver.c
trunk/g10/mainproc.c
trunk/g10/options.h
Log:
* options.h, gpg.c (main), mainproc.c (check_sig_and_print), keyserver.c
(keyserver_opts): Rename auto-pka-retrieve to honor-pka-record to be
consistent with honor-keyserver-url.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2006-02-22 19:06:23 UTC (rev 4016)
+++ trunk/g10/ChangeLog 2006-02-22 20:20:58 UTC (rev 4017)
@@ -1,5 +1,9 @@
2006-02-22 David Shaw <dshaw at jabberwocky.com>
+ * options.h, gpg.c (main), mainproc.c (check_sig_and_print),
+ keyserver.c (keyserver_opts): Rename auto-pka-retrieve to
+ honor-pka-record to be consistent with honor-keyserver-url.
+
* options.h, keydb.h, g10.c (main), getkey.c
(parse_auto_key_locate): Parse a list of key access methods.
(get_pubkey_byname): Walk the list here to try and retrieve keys
Modified: trunk/g10/gpg.c
===================================================================
--- trunk/g10/gpg.c 2006-02-22 19:06:23 UTC (rev 4016)
+++ trunk/g10/gpg.c 2006-02-22 20:20:58 UTC (rev 4017)
@@ -1731,7 +1731,7 @@
opt.keyserver_options.import_options=IMPORT_REPAIR_PKS_SUBKEY_BUG;
opt.keyserver_options.export_options=EXPORT_ATTRIBUTES;
opt.keyserver_options.options=
- KEYSERVER_INCLUDE_SUBKEYS|KEYSERVER_INCLUDE_REVOKED|KEYSERVER_TRY_DNS_SRV|KEYSERVER_HONOR_KEYSERVER_URL|KEYSERVER_AUTO_PKA_RETRIEVE;
+ KEYSERVER_INCLUDE_SUBKEYS|KEYSERVER_INCLUDE_REVOKED|KEYSERVER_TRY_DNS_SRV|KEYSERVER_HONOR_KEYSERVER_URL|KEYSERVER_HONOR_PKA_RECORD;
opt.verify_options=
VERIFY_SHOW_POLICY_URLS|VERIFY_SHOW_STD_NOTATIONS|VERIFY_SHOW_KEYSERVER_URLS;
opt.trust_model=TM_AUTO;
Modified: trunk/g10/keyserver.c
===================================================================
--- trunk/g10/keyserver.c 2006-02-22 19:06:23 UTC (rev 4016)
+++ trunk/g10/keyserver.c 2006-02-22 20:20:58 UTC (rev 4017)
@@ -85,14 +85,14 @@
NULL},
{"auto-key-retrieve",KEYSERVER_AUTO_KEY_RETRIEVE,NULL,
N_("automatically retrieve keys when verifying signatures")},
- {"auto-pka-retrieve",KEYSERVER_AUTO_PKA_RETRIEVE,NULL,
- N_("automatically retrieve keys from PKA records")},
{"auto-cert-retrieve",KEYSERVER_AUTO_CERT_RETRIEVE,NULL,
N_("automatically retrieve keys from DNS")},
{"try-dns-srv",KEYSERVER_TRY_DNS_SRV,NULL,
NULL},
{"honor-keyserver-url",KEYSERVER_HONOR_KEYSERVER_URL,NULL,
N_("honor the preferred keyserver URL set on the key")},
+ {"honor-pka-record",KEYSERVER_HONOR_PKA_RECORD,NULL,
+ N_("honor the PKA record set on a key when retrieving keys")},
{NULL,0,NULL,NULL}
};
@@ -1740,7 +1740,7 @@
/* Try and parse the keyserver URL. If it doesn't work,
then we end up writing NULL which indicates we are
the same as any other key. */
- if(uid && sig)
+ if(sig)
(*klist)[*count].skipfncvalue=parse_preferred_keyserver(sig);
}
@@ -1977,7 +1977,8 @@
return rc;
}
-/* Import key pointed to by a PKA record */
+/* Import key pointed to by a PKA record. Return the requested
+ fingerprint in fpr. */
int
keyserver_import_pka(const char *name,unsigned char *fpr)
{
@@ -2041,6 +2042,11 @@
keyserver->host=xmalloc(5+strlen(domain)+1);
strcpy(keyserver->host,"keys.");
strcat(keyserver->host,domain);
+ keyserver->uri=xmalloc(strlen(keyserver->scheme)+
+ 3+strlen(keyserver->host)+1);
+ strcpy(keyserver->uri,keyserver->scheme);
+ strcat(keyserver->uri,"://");
+ strcat(keyserver->uri,keyserver->host);
rc=keyserver_work(KS_GETNAME,list,NULL,0,keyserver);
Modified: trunk/g10/mainproc.c
===================================================================
--- trunk/g10/mainproc.c 2006-02-22 19:06:23 UTC (rev 4016)
+++ trunk/g10/mainproc.c 2006-02-22 20:20:58 UTC (rev 4017)
@@ -1530,11 +1530,11 @@
}
}
-
/* If the preferred keyserver thing above didn't work, our second
try is to use the URI from a DNS PKA record. */
if ( rc == G10ERR_NO_PUBKEY
- && (opt.keyserver_options.options&KEYSERVER_AUTO_PKA_RETRIEVE))
+ && opt.keyserver_options.options&KEYSERVER_AUTO_KEY_RETRIEVE
+ && opt.keyserver_options.options&KEYSERVER_HONOR_PKA_RECORD)
{
const char *uri = pka_uri_from_sig (sig);
@@ -1558,12 +1558,11 @@
}
}
-
/* If the preferred keyserver thing above didn't work and we got
no information from the DNS PKA, this is a third try. */
if( rc == G10ERR_NO_PUBKEY && opt.keyserver
- && (opt.keyserver_options.options&KEYSERVER_AUTO_KEY_RETRIEVE))
+ && opt.keyserver_options.options&KEYSERVER_AUTO_KEY_RETRIEVE)
{
int res;
Modified: trunk/g10/options.h
===================================================================
--- trunk/g10/options.h 2006-02-22 19:06:23 UTC (rev 4016)
+++ trunk/g10/options.h 2006-02-22 20:20:58 UTC (rev 4017)
@@ -319,7 +319,7 @@
#define KEYSERVER_AUTO_KEY_RETRIEVE (1<<5)
#define KEYSERVER_TRY_DNS_SRV (1<<6)
#define KEYSERVER_HONOR_KEYSERVER_URL (1<<7)
-#define KEYSERVER_AUTO_PKA_RETRIEVE (1<<8)
+#define KEYSERVER_HONOR_PKA_RECORD (1<<8)
#define KEYSERVER_AUTO_CERT_RETRIEVE (1<<9)
#endif /*G10_OPTIONS_H*/
More information about the Gnupg-commits
mailing list