[poppler] Branch 'signatureHandling' - 2 commits - poppler/SignatureHandler.cc poppler/SignatureInfo.h utils/pdfsigverify.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Tue Oct 27 14:29:02 PDT 2015


 poppler/SignatureHandler.cc |    6 +++++-
 poppler/SignatureInfo.h     |    4 +++-
 utils/pdfsigverify.cc       |    7 +++++--
 3 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 1d97f708ceb7cd34ccdb1a4f85192efe83d1853c
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Oct 27 22:27:31 2015 +0100

    Differentiate between unknown and untrusted issuer

diff --git a/poppler/SignatureHandler.cc b/poppler/SignatureHandler.cc
index bd1ed45..e5ad4f8 100644
--- a/poppler/SignatureHandler.cc
+++ b/poppler/SignatureHandler.cc
@@ -323,8 +323,10 @@ CertificateValidationStatus SignatureHandler::NSS_CertTranslate(SECErrorCodes ns
   switch(nss_code)
   {
     case SEC_ERROR_UNKNOWN_ISSUER:
+      return CERTIFICATE_UNKNOWN_ISSUER;
+
     case SEC_ERROR_UNTRUSTED_ISSUER:
-      return CERTIFICATE_UNTRUSTED;
+      return CERTIFICATE_UNTRUSTED_ISSUER;
 
     case SEC_ERROR_REVOKED_CERTIFICATE:
       return CERTIFICATE_REVOKED;
diff --git a/poppler/SignatureInfo.h b/poppler/SignatureInfo.h
index 1843aeb..82b4ec4 100644
--- a/poppler/SignatureInfo.h
+++ b/poppler/SignatureInfo.h
@@ -6,6 +6,7 @@
 //
 // Copyright 2015 André Guerreiro <aguerreiro1985 at gmail.com>
 // Copyright 2015 André Esser <bepandre at hotmail.com>
+// Copyright 2015 Albert Astals Cid <aacid at kde.org>
 //
 //========================================================================
 
@@ -28,7 +29,8 @@ enum SignatureValidationStatus
 enum CertificateValidationStatus
 {
   CERTIFICATE_TRUSTED,
-  CERTIFICATE_UNTRUSTED,
+  CERTIFICATE_UNTRUSTED_ISSUER,
+  CERTIFICATE_UNKNOWN_ISSUER,
   CERTIFICATE_REVOKED,
   CERTIFICATE_EXPIRED,
   CERTIFICATE_GENERIC_ERROR,
diff --git a/utils/pdfsigverify.cc b/utils/pdfsigverify.cc
index fb636bc..a9a801d 100644
--- a/utils/pdfsigverify.cc
+++ b/utils/pdfsigverify.cc
@@ -57,8 +57,11 @@ const char * getReadableCertState(CertificateValidationStatus cert_vs)
     case CERTIFICATE_TRUSTED:
       return "Certificate is Trusted.";
 
-    case CERTIFICATE_UNTRUSTED:
-      return "Certificate isn't Trusted.";
+    case CERTIFICATE_UNTRUSTED_ISSUER:
+      return "Certificate issuer isn't Trusted.";
+
+    case CERTIFICATE_UNKNOWN_ISSUER:
+      return "Certificate issuer is unknown.";
 
     case CERTIFICATE_REVOKED:
       return "Certificate has been Revoked.";
commit 19e20dc69a631f92bf4fdc0be0dd840a460cfc92
Author: Markus Kilås <digital at markuspage.com>
Date:   Tue Oct 27 22:23:06 2015 +0100

    Handle untrusted issuer

diff --git a/poppler/SignatureHandler.cc b/poppler/SignatureHandler.cc
index 10caed7..bd1ed45 100644
--- a/poppler/SignatureHandler.cc
+++ b/poppler/SignatureHandler.cc
@@ -7,6 +7,7 @@
 // Copyright 2015 André Guerreiro <aguerreiro1985 at gmail.com>
 // Copyright 2015 André Esser <bepandre at hotmail.com>
 // Copyright 2015 Albert Astals Cid <aacid at kde.org>
+// Copyright 2015 Markus Kilås <digital at markuspage.com>
 //
 //========================================================================
 
@@ -322,6 +323,7 @@ CertificateValidationStatus SignatureHandler::NSS_CertTranslate(SECErrorCodes ns
   switch(nss_code)
   {
     case SEC_ERROR_UNKNOWN_ISSUER:
+    case SEC_ERROR_UNTRUSTED_ISSUER:
       return CERTIFICATE_UNTRUSTED;
 
     case SEC_ERROR_REVOKED_CERTIFICATE:


More information about the poppler mailing list