summaryrefslogtreecommitdiff
path: root/source/tools/pdfsign.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/tools/pdfsign.c')
-rw-r--r--source/tools/pdfsign.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/tools/pdfsign.c b/source/tools/pdfsign.c
index bc14be41..434c9332 100644
--- a/source/tools/pdfsign.c
+++ b/source/tools/pdfsign.c
@@ -4,6 +4,7 @@
#include "mupdf/fitz.h"
#include "mupdf/pdf.h"
+#include "mupdf/helpers/pkcs7-check.h"
#include <string.h>
#include <stdlib.h>
@@ -22,10 +23,14 @@ static void usage(void)
void verify_signature(fz_context *ctx, pdf_document *doc, int n, pdf_widget *widget)
{
+#ifdef HAVE_LIBCRYPTO
char msg[256];
printf("verifying signature on page %d\n", n+1);
pdf_check_signature(ctx, doc, widget, msg, sizeof msg);
printf(" result: '%s'\n", msg);
+#else
+ printf("No signature support in this build\n");
+#endif
}
void verify_page(fz_context *ctx, pdf_document *doc, int n, pdf_page *page)