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

New commits:
commit e18bdd936d9da551506715f8f7e36c13599c9728
Author: Albert Astals Cid <[email protected]>
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 <[email protected]>
 // Copyright 2015 André Esser <[email protected]>
-// Copyright 2015, 2016, 2018, 2019, 2021, 2022 Albert Astals Cid 
<[email protected]>
+// Copyright 2015, 2016, 2018, 2019, 2021-2023 Albert Astals Cid 
<[email protected]>
 // Copyright 2015 Markus Kilås <[email protected]>
 // Copyright 2017 Sebastian Rasmussen <[email protected]>
 // Copyright 2017 Hans-Ulrich Jüttner <[email protected]>
@@ -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;

Reply via email to