core: Check for gpg version for loopback mode

* src/engine-gpg.c (build_argv): Check for version 2.1.0
before adding pinentry-mode.

--
This is a compatibility fix for older versions that don't support
this flag which would otherwise result in an invalid argument
error.
This commit is contained in:
Andre Heinecke 2016-09-06 16:30:24 +02:00
parent efe7e11dfa
commit e8cb143c83

View File

@ -866,7 +866,7 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
argc++; argc++;
} }
if (gpg->pinentry_mode) if (gpg->pinentry_mode && have_gpg_version (gpg, "2.1.0"))
{ {
const char *s = NULL; const char *s = NULL;
switch (gpg->pinentry_mode) switch (gpg->pinentry_mode)