[poppler] poppler/SignatureHandler.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 16 08:34:29 UTC 2023


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

New commits:
commit e18bdd936d9da551506715f8f7e36c13599c9728
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Mar 16 00:53:10 2023 +0100

    SignatureHandler::validateSignature: Use the actual hash length
    
    It's going to be the same size, but this is more proper

diff --git a/poppler/SignatureHandler.cc b/poppler/SignatureHandler.cc
index 059d8efb..231a8c01 100644
--- a/poppler/SignatureHandler.cc
+++ b/poppler/SignatureHandler.cc
@@ -6,7 +6,7 @@
 //
 // Copyright 2015, 2016 André Guerreiro <aguerreiro1985 at gmail.com>
 // Copyright 2015 André Esser <bepandre at hotmail.com>
-// Copyright 2015, 2016, 2018, 2019, 2021, 2022 Albert Astals Cid <aacid at kde.org>
+// Copyright 2015, 2016, 2018, 2019, 2021-2023 Albert Astals Cid <aacid at kde.org>
 // Copyright 2015 Markus Kilås <digital at markuspage.com>
 // Copyright 2017 Sebastian Rasmussen <sebras at gmail.com>
 // Copyright 2017 Hans-Ulrich Jüttner <huj at froreich-bioscientia.de>
@@ -957,7 +957,7 @@ SignatureValidationStatus SignatureHandler::validateSignature()
 
     SECItem digest;
     digest.data = digest_buffer.data();
-    digest.len = digest_buffer.size();
+    digest.len = result_len;
 
     if ((NSS_CMSSignerInfo_GetSigningCertificate(CMSSignerInfo, CERT_GetDefaultCertDB())) == nullptr) {
         CMSSignerInfo->verificationStatus = NSSCMSVS_SigningCertNotFound;


More information about the poppler mailing list