mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-08 23:37:47 +02:00
g10: Fix card-edit/fetch to use keyserver_fetch.
* g10/card-util.c (fetch_url): Call keyserver_fetch instead of
keyserver_import_fprint.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
GnuPG-bug-id: 1828
(backport of master
commit 6f5ff1cfe4
)
This commit is contained in:
parent
c68d39f711
commit
fb0e18b384
|
@ -729,28 +729,18 @@ fetch_url(void)
|
||||||
log_error("error retrieving URL from card: %s\n",gpg_strerror(rc));
|
log_error("error retrieving URL from card: %s\n",gpg_strerror(rc));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct keyserver_spec *spec=NULL;
|
|
||||||
|
|
||||||
rc=agent_scd_getattr("KEY-FPR",&info);
|
rc=agent_scd_getattr("KEY-FPR",&info);
|
||||||
if(rc)
|
if(rc)
|
||||||
log_error("error retrieving key fingerprint from card: %s\n",
|
log_error("error retrieving key fingerprint from card: %s\n",
|
||||||
gpg_strerror(rc));
|
gpg_strerror(rc));
|
||||||
else if (info.pubkey_url && *info.pubkey_url)
|
else if (info.pubkey_url && *info.pubkey_url)
|
||||||
{
|
{
|
||||||
spec=parse_keyserver_uri(info.pubkey_url,1,NULL,0);
|
strlist_t sl = NULL;
|
||||||
if(spec && info.fpr1valid)
|
|
||||||
{
|
add_to_strlist (&sl, info.pubkey_url);
|
||||||
/* This is not perfectly right. Currently, all card
|
rc = keyserver_fetch (sl);
|
||||||
fingerprints are 20 digits, but what about
|
free_strlist (sl);
|
||||||
fingerprints for a future v5 key? We should get the
|
}
|
||||||
length from somewhere lower in the code. In any
|
|
||||||
event, the fpr/keyid is not meaningful for straight
|
|
||||||
HTTP fetches, but using it allows the card to point
|
|
||||||
to HKP and LDAP servers as well. */
|
|
||||||
rc=keyserver_import_fprint(info.fpr1,20,spec);
|
|
||||||
free_keyserver_spec(spec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (info.fpr1valid)
|
else if (info.fpr1valid)
|
||||||
{
|
{
|
||||||
rc = keyserver_import_fprint (info.fpr1, 20, opt.keyserver);
|
rc = keyserver_import_fprint (info.fpr1, 20, opt.keyserver);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user