aboutsummaryrefslogtreecommitdiffstats
path: root/g10/card-util.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-02-16 20:08:14 +0000
committerWerner Koch <[email protected]>2005-02-16 20:08:14 +0000
commit00ef56868d112a71a266f35445751e39bc4119a0 (patch)
treef81d6dc7df355e6dd09b26c92a5645ba8e89778b /g10/card-util.c
parent* w32installer.nsi: Added page to select the language. (diff)
downloadgnupg-00ef56868d112a71a266f35445751e39bc4119a0.tar.gz
gnupg-00ef56868d112a71a266f35445751e39bc4119a0.zip
* card-util.c (fetch_url): Fetch the key from the default
keyserver if no URL is available. * w32installer.nsi: Added page to select the language. * mk-w32-dist: Create the opt.ini using the available languages.
Diffstat (limited to 'g10/card-util.c')
-rw-r--r--g10/card-util.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/g10/card-util.c b/g10/card-util.c
index 928a5af5e..cbf8ec606 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -566,6 +566,9 @@ change_url (void)
return rc;
}
+
+/* Fetch the key from the URL given on teh card or try to get it from
+ the default keyserver. */
static int
fetch_url(void)
{
@@ -578,7 +581,7 @@ fetch_url(void)
rc=agent_scd_getattr("PUBKEY-URL",&info);
if(rc)
log_error("error retrieving URL from card: %s\n",gpg_strerror(rc));
- else if(info.pubkey_url)
+ else
{
struct keyserver_spec *spec=NULL;
@@ -586,7 +589,7 @@ fetch_url(void)
if(rc)
log_error("error retrieving key fingerprint from card: %s\n",
gpg_strerror(rc));
- else
+ else if (info.pubkey_url && *info.pubkey_url)
{
spec=parse_keyserver_uri(info.pubkey_url,0,NULL,0);
if(spec && info.fpr1valid)
@@ -602,9 +605,11 @@ fetch_url(void)
free_keyserver_spec(spec);
}
}
+ else if (info.fpr1valid)
+ {
+ rc = keyserver_import_fprint (info.fpr1, 20, opt.keyserver);
+ }
}
- else
- log_error("no URL set on card\n");
return rc;
#else