parent
165174f22a
commit
1527431bbe
@ -0,0 +1,58 @@
|
||||
From 68840d4a34e1e56ea9130158e8e163fb60550db4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <68840d4a34e1e56ea9130158e8e163fb60550db4.1542273624.git.mjg@fedoraproject.org>
|
||||
From: Tor Andersson <tor.andersson@artifex.com>
|
||||
Date: Wed, 7 Nov 2018 19:44:55 +0100
|
||||
Subject: [PATCH] Fix 699840: Use saved sig_widget pointer to sign signatures,
|
||||
not selected_annot.
|
||||
|
||||
---
|
||||
platform/gl/gl-form.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/platform/gl/gl-form.c b/platform/gl/gl-form.c
|
||||
index 94daa8e2..889554f2 100644
|
||||
--- a/platform/gl/gl-form.c
|
||||
+++ b/platform/gl/gl-form.c
|
||||
@@ -10,6 +10,10 @@
|
||||
#include "mupdf/helpers/pkcs7-check.h"
|
||||
#include "mupdf/helpers/pkcs7-openssl.h"
|
||||
|
||||
+static pdf_widget *sig_widget;
|
||||
+static char sig_status[500];
|
||||
+static int sig_result;
|
||||
+
|
||||
static char cert_filename[PATH_MAX];
|
||||
static struct input cert_password;
|
||||
|
||||
@@ -22,7 +26,7 @@ static void do_sign(void)
|
||||
fz_try(ctx)
|
||||
{
|
||||
signer = pkcs7_openssl_read_pfx(ctx, cert_filename, cert_password.text);
|
||||
- pdf_sign_signature(ctx, pdf, selected_annot, signer);
|
||||
+ pdf_sign_signature(ctx, pdf, sig_widget, signer);
|
||||
ui_show_warning_dialog("Signed document successfully.");
|
||||
}
|
||||
fz_always(ctx)
|
||||
@@ -33,7 +37,7 @@ static void do_sign(void)
|
||||
fz_catch(ctx)
|
||||
ui_show_warning_dialog("%s", fz_caught_message(ctx));
|
||||
|
||||
- if (pdf_update_page(ctx, selected_annot->page))
|
||||
+ if (pdf_update_page(ctx, sig_widget->page))
|
||||
render_page();
|
||||
}
|
||||
|
||||
@@ -84,10 +88,6 @@ static void cert_file_dialog(void)
|
||||
}
|
||||
}
|
||||
|
||||
-static pdf_widget *sig_widget;
|
||||
-static char sig_status[500];
|
||||
-static int sig_result;
|
||||
-
|
||||
static void sig_dialog(void)
|
||||
{
|
||||
const char *label = pdf_field_label(ctx, sig_widget->page->doc, sig_widget->obj);
|
||||
--
|
||||
2.19.1.1238.g4b45f61cc0
|
||||
|
Loading…
Reference in new issue