summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/sign.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/g10/sign.c b/g10/sign.c
index 2ab76c99b..385254987 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1928,6 +1928,15 @@ update_keysig_packet (ctrl_t ctrl,
/* Create a new signature packet. */
sig = copy_signature (NULL, orig_sig);
+ /* Don't generate version 3 signature, but newer. */
+ if (sig->version == 3)
+ {
+ if (pk->version > 3)
+ sig->version = pk->version;
+ else
+ sig->version = 4;
+ }
+
sig->digest_algo = digest_algo;
/* We need to create a new timestamp so that new sig expiration