[poppler] utils/pdfsig.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 16 08:12:32 UTC 2021


 utils/pdfsig.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4eb0f56a92113de45e4ec0e10e90f23d4a9227bc
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Sep 16 10:06:26 2021 +0200

    pdfsig: setNSSDir needs to be called before getAvailableSigningCertificates

diff --git a/utils/pdfsig.cc b/utils/pdfsig.cc
index 52593bbf..a440dcd6 100644
--- a/utils/pdfsig.cc
+++ b/utils/pdfsig.cc
@@ -161,6 +161,8 @@ int main(int argc, char *argv[])
 
     const bool ok = parseArgs(argDesc, &argc, argv);
 
+    SignatureHandler::setNSSDir(nssDir);
+
     if (listNicknames) {
         bool passwordNeeded = false;
         auto passwordCallback = [&passwordNeeded](const char *) -> char * {
@@ -210,8 +212,6 @@ int main(int argc, char *argv[])
 
     std::unique_ptr<GooString> fileName = std::make_unique<GooString>(argv[1]);
 
-    SignatureHandler::setNSSDir(nssDir);
-
     // open PDF file
     std::unique_ptr<PDFDoc> doc(PDFDocFactory().createPDFDoc(*fileName, nullptr, nullptr));
 


More information about the poppler mailing list