aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog8
-rw-r--r--g10/keyserver.c6
-rw-r--r--g10/sign.c12
3 files changed, 23 insertions, 3 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index ee80b96b8..8aae0309a 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,11 @@
+2004-05-18 David Shaw <[email protected]>
+
+ * sign.c (update_keysig_packet): Policies and notations should be
+ stripped out when remaking a self-signature. Noted by Atom
+ Smasher.
+
+ * keyserver.c (parse_keyserver_uri): Fix compiler warnings.
+
2004-05-11 David Shaw <[email protected]>
* options.h, keyserver-internal.h, keyserver.c
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 1d614da75..53f75ff69 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -163,7 +163,7 @@ parse_keyserver_uri(const char *uri,int require_scheme,
/* Get the scheme */
- for(idx=uri,count=0;*idx && *idx!=':';*idx++)
+ for(idx=uri,count=0;*idx && *idx!=':';idx++)
count++;
if(count==0)
@@ -218,7 +218,7 @@ parse_keyserver_uri(const char *uri,int require_scheme,
if(!assume_hkp)
uri+=2;
- for(idx=uri,count=0;*idx && *idx!=':' && *idx!='/';*idx++)
+ for(idx=uri,count=0;*idx && *idx!=':' && *idx!='/';idx++)
count++;
if(count==0)
@@ -238,7 +238,7 @@ parse_keyserver_uri(const char *uri,int require_scheme,
imply there is no limit. Of course, the real world has
limits. */
- for(idx=uri+1,count=0;*idx && *idx!='/';*idx++)
+ for(idx=uri+1,count=0;*idx && *idx!='/';idx++)
{
count++;
diff --git a/g10/sign.c b/g10/sign.c
index 44c53f8b3..7ca0eed66 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1381,6 +1381,18 @@ update_keysig_packet( PKT_signature **ret_sig,
/* create a new signature packet */
sig = copy_signature (NULL, orig_sig);
+ /* We've copied the signature, subpackets and all, but we don't
+ want any old policies or notations coming over: the signature
+ is being remade, so these need to be restated as well. Note
+ that other subpackets like backsigs come over as well, but we
+ want to keep those. We don't delete policies or notations from
+ the unhashed area - since we don't put them there, this is a
+ case of not messing about with things that we are not
+ responsible for. */
+
+ delete_sig_subpkt(sig->hashed,SIGSUBPKT_POLICY);
+ delete_sig_subpkt(sig->hashed,SIGSUBPKT_NOTATION);
+
/* We need to create a new timestamp so that new sig expiration
calculations are done correctly... */
sig->timestamp=make_timestamp();