aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2006-03-22 23:05:32 +0000
committerDavid Shaw <[email protected]>2006-03-22 23:05:32 +0000
commit97b0606a95b2d18374cbdae64a054d71153508b3 (patch)
treec06c3fef6fb1b38d4e13cd78e58de00a89997cb1
parentChanged URLs (diff)
downloadgnupg-97b0606a95b2d18374cbdae64a054d71153508b3.tar.gz
gnupg-97b0606a95b2d18374cbdae64a054d71153508b3.zip
* getkey.c (parse_auto_key_locate): Silently strip out duplicates rather
than causing an error.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/getkey.c15
2 files changed, 15 insertions, 5 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 3b37911bc..18c729975 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-22 David Shaw <[email protected]>
+
+ * getkey.c (parse_auto_key_locate): Silently strip out duplicates
+ rather than causing an error.
+
2006-03-22 Werner Koch <[email protected]>
* sig-check.c (signature_check2): Changed warning URL to include faq.
diff --git a/g10/getkey.c b/g10/getkey.c
index 0a314c4ee..1c85fb405 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -2934,6 +2934,7 @@ parse_auto_key_locate(char *options)
while((tok=optsep(&options)))
{
struct akl *akl,*last;
+ int dupe=0;
if(tok[0]=='\0')
continue;
@@ -2969,15 +2970,19 @@ parse_auto_key_locate(char *options)
|| (akl->type==AKL_SPEC
&& strcmp(last->spec->uri,akl->spec->uri)==0)))
{
+ dupe=1;
free_akl(akl);
- return 0;
+ break;
}
}
- if(last)
- last->next=akl;
- else
- opt.auto_key_locate=akl;
+ if(!dupe)
+ {
+ if(last)
+ last->next=akl;
+ else
+ opt.auto_key_locate=akl;
+ }
}
return 1;