From 37ed199fcebc73954e694b44033aeca4ab8a417f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 11 Jul 2018 12:23:52 +0200 Subject: Use stubs instead of conditional compile with HAVE_LIBCRYPTO. The macro is only set when building the pkcs7-helper library, so cannot be used by client code. Build stub functions when compiling the pkcs7-openssl helper library without libcrypto. --- platform/gl/gl-form.c | 4 ---- platform/x11/pdfapp.c | 4 ---- 2 files changed, 8 deletions(-) (limited to 'platform') diff --git a/platform/gl/gl-form.c b/platform/gl/gl-form.c index 123e8769..e42581ba 100644 --- a/platform/gl/gl-form.c +++ b/platform/gl/gl-form.c @@ -15,7 +15,6 @@ static struct input cert_password; static void do_sign(void) { -#ifdef HAVE_LIBCRYPTO pdf_pkcs7_signer *signer = NULL; fz_var(signer); @@ -36,9 +35,6 @@ static void do_sign(void) if (pdf_update_page(ctx, selected_annot->page)) render_page(); -#else - ui_show_warning_dialog("Document not signed as no LIBCRYPTO."); -#endif } static void cert_password_dialog(void) diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index 22fb7f1b..c273bfea 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -1696,7 +1696,6 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta break; case PDF_WIDGET_TYPE_SIGNATURE: -#ifdef HAVE_LIBCRYPTO if (state == -1) { char ebuf[256]; @@ -1752,9 +1751,6 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta } } } -#else - winwarn(app, "Cannot check signatures as no libcrypto!"); -#endif break; } } -- cgit v1.2.3