diff options
author | Sune Vuorela <sune@vuorela.dk> | 2023-09-07 16:06:40 +0200 |
---|---|---|
committer | Sune Vuorela <sune@vuorela.dk> | 2023-09-07 16:12:08 +0200 |
commit | cc2fd7c39f1fddd233336099c031bff6bc0d9828 (patch) | |
tree | 32a08088dd5280084a620afda963d2cf43e35658 | |
parent | 3f2e643c4e1c4295c7521681216a90bb02518748 (diff) |
More supported gnupg releases
The upcoming 2.2.42 version will have the bugfixes backported for pdf
signatures to work.
-rw-r--r-- | poppler/GPGMECryptoSignBackend.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/poppler/GPGMECryptoSignBackend.cc b/poppler/GPGMECryptoSignBackend.cc index 273cce0e..b89f61fc 100644 --- a/poppler/GPGMECryptoSignBackend.cc +++ b/poppler/GPGMECryptoSignBackend.cc @@ -21,7 +21,15 @@ bool GpgSignatureBackend::hasSufficientVersion() // Most gpg signatures are padded. This is fixed for 2.4.1 // gpg 2.4.0 does not support generating signatures // with definite lengths. This is also fixed for 2.4.1. - return GpgME::engineInfo(GpgME::GpgSMEngine).engineVersion() > "2.4.0"; + // this has also been fixed in 2.2.42 in the 2.2 branch + auto version = GpgME::engineInfo(GpgME::GpgSMEngine).engineVersion(); + if (version > "2.4.0") { + return true; + } + if (version >= "2.3.0") { // development branch for 2.4 releases; no more releases here + return false; + } + return version >= "2.2.42"; } /// GPGME helper methods |