summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-form.c
diff options
context:
space:
mode:
authorPaul Gardiner <paul.gardiner@artifex.com>2018-01-23 10:02:43 +0000
committerPaul Gardiner <paul.gardiner@artifex.com>2018-02-02 12:36:13 +0000
commit0312fb0efa320655905bd72b1af4228f017a8498 (patch)
tree4cadc1ad478bd6ccf42cbebbf755ac8e146e7d2a /source/pdf/pdf-form.c
parent8ac8d47f25b2868d464be71ed3b9ed04b71cb524 (diff)
downloadmupdf-0312fb0efa320655905bd72b1af4228f017a8498.tar.xz
Signature support: simplify pkcs7 api by the removal of byte ranges.
Rather than provide a stream and an explicitly defined set of byte ranges within that stream, provide a stream that gives access to just the bytes in the ranges.
Diffstat (limited to 'source/pdf/pdf-form.c')
-rw-r--r--source/pdf/pdf-form.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c
index 63562ef6..36d07ee1 100644
--- a/source/pdf/pdf-form.c
+++ b/source/pdf/pdf-form.c
@@ -1277,7 +1277,7 @@ void pdf_choice_widget_set_value(fz_context *ctx, pdf_document *doc, pdf_widget
}
}
-int pdf_signature_widget_byte_range(fz_context *ctx, pdf_document *doc, pdf_widget *widget, int (*byte_range)[2])
+int pdf_signature_widget_byte_range(fz_context *ctx, pdf_document *doc, pdf_widget *widget, fz_range *byte_range)
{
pdf_annot *annot = (pdf_annot *)widget;
pdf_obj *br = pdf_dict_getl(ctx, annot->obj, PDF_NAME_V, PDF_NAME_ByteRange, NULL);
@@ -1287,8 +1287,8 @@ int pdf_signature_widget_byte_range(fz_context *ctx, pdf_document *doc, pdf_widg
{
for (i = 0; i < n; i++)
{
- byte_range[i][0] = pdf_to_int(ctx, pdf_array_get(ctx, br, 2*i));
- byte_range[i][1] = pdf_to_int(ctx, pdf_array_get(ctx, br, 2*i+1));
+ byte_range[i].offset = pdf_to_int(ctx, pdf_array_get(ctx, br, 2*i));
+ byte_range[i].len = pdf_to_int(ctx, pdf_array_get(ctx, br, 2*i+1));
}
}