From fd680254dae58a6bf6fb83688bf7c849257688a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 14 Dec 2021 14:41:23 +0100 Subject: [PATCH] core: Set --key-origin option only if supported by gpg * src/engine-gpg.c (gpg_import): Do not pass --key-origin option to gpg if gpg is too old. -- GnuPG-bug-id: 5733 --- src/engine-gpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 9591c60a..fe9ff101 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -2831,7 +2831,7 @@ gpg_import (void *engine, gpgme_data_t keydata, gpgme_key_t *keyarray, else { err = add_arg (gpg, "--import"); - if (!err && key_origin) + if (!err && key_origin && have_gpg_version (gpg, "2.1.22")) { err = add_arg (gpg, "--key-origin"); if (!err)