aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine-gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine-gpg.c')
-rw-r--r--src/engine-gpg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index 5e663e16..969abab6 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -3164,6 +3164,13 @@ gpg_keysign (void *engine, gpgme_key_t key, const char *userid,
else
err = add_arg (gpg, "--quick-sign-key");
+ /* The force flag as only an effect with recent gpg versions; if the
+ * gpg version is too old, the signature will simply not be created.
+ * I think this is better than bailing out. */
+ if (!err && (flags & GPGME_KEYSIGN_FORCE)
+ && have_gpg_version (gpg, "2.2.28"))
+ err = add_arg (gpg, "--force-sign-key");
+
if (!err)
err = append_args_from_signers (gpg, ctx);