diff options
author | Paul Gardiner <paul.gardiner@artifex.com> | 2018-02-01 13:19:48 +0000 |
---|---|---|
committer | Paul Gardiner <paul.gardiner@artifex.com> | 2018-02-02 12:38:36 +0000 |
commit | 8ec561d1bccc46e9db40a9f61310cd8b3763914e (patch) | |
tree | 9db671082225933f9429ac9c0cc9ec1f4aaea3a1 /source/helpers/pkcs7/pkcs7-check.c | |
parent | e0b3451e473885a39ed54c8bf7a98e48a3cf5502 (diff) | |
download | mupdf-8ec561d1bccc46e9db40a9f61310cd8b3763914e.tar.xz |
Signature support: add a null pdf_check_signature function
Add a version of pdf_check_signature function that reports no support,
for builds without openssl. This allows the removal of ifdefs from the
apps.
Diffstat (limited to 'source/helpers/pkcs7/pkcs7-check.c')
-rw-r--r-- | source/helpers/pkcs7/pkcs7-check.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/helpers/pkcs7/pkcs7-check.c b/source/helpers/pkcs7/pkcs7-check.c index 4c70bb2c..225ec385 100644 --- a/source/helpers/pkcs7/pkcs7-check.c +++ b/source/helpers/pkcs7/pkcs7-check.c @@ -1,8 +1,10 @@ #include "mupdf/fitz.h" #include "mupdf/pdf.h" -#include "mupdf/helpers/pkcs7-openssl.h" + #include "mupdf/helpers/pkcs7-check.h" +#ifdef HAVE_LIBCRYPTO +#include "mupdf/helpers/pkcs7-openssl.h" #include <string.h> @@ -126,3 +128,13 @@ int pdf_check_signature(fz_context *ctx, pdf_document *doc, pdf_widget *widget, return res; } + +#else + +int pdf_check_signature(fz_context *ctx, pdf_document *doc, pdf_widget *widget, char *ebuf, int ebufsize) +{ + fz_strlcpy(ebuf, "No digital signing support in this build", ebufsize); + return 0; +} + +#endif |