[gs-commits] mupdf 1.16.1.50 Handle cleared signatures in mutool sign.

[email protected] (Sebastian Rasmussen) Mon, 30 Sep 2019 15:59:38 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
commit 0b61eeb8d94b747711a81010d492fcc9f51fcb94
Author: Sebastian Rasmussen <[email protected]>
Date:   Mon Sep 30 13:20:24 2019 +0200

    Handle cleared signatures in mutool sign.

diff --git a/source/tools/pdfsign.c b/source/tools/pdfsign.c
index d0a7fec..7703d6d 100644
--- a/source/tools/pdfsign.c
+++ b/source/tools/pdfsign.c
@@ -42,6 +42,12 @@ static void verify_signature(fz_context *ctx, pdf_document *doc, pdf_obj *signat
 
 	printf("verifying signature %d\n", pdf_to_num(ctx, signature));
 
+	if (!pdf_signature_is_signed(ctx, doc, signature))
+	{
+		printf("  Signature is not signed\n");
+		return;
+	}
+
 	pdf_signature_designated_name(ctx, doc, signature, name, sizeof name);
 	printf("  Designated name: %s\n", name);
 

http://git.ghostscript.com/?p=mupdf.git;a=commit;h=0b61eeb8d94b747711a81010d492fcc9f51fcb94

--
MuPDF library
Artifex Software, Inc.