diff options
author | Paul Gardiner <paul.gardiner@artifex.com> | 2018-01-23 10:02:43 +0000 |
---|---|---|
committer | Paul Gardiner <paul.gardiner@artifex.com> | 2018-02-02 12:36:13 +0000 |
commit | 0312fb0efa320655905bd72b1af4228f017a8498 (patch) | |
tree | 4cadc1ad478bd6ccf42cbebbf755ac8e146e7d2a /include | |
parent | 8ac8d47f25b2868d464be71ed3b9ed04b71cb524 (diff) | |
download | mupdf-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 'include')
-rw-r--r-- | include/mupdf/pdf/crypt.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/pdf-pkcs7.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/mupdf/pdf/crypt.h b/include/mupdf/pdf/crypt.h index 59513acc..3aee039a 100644 --- a/include/mupdf/pdf/crypt.h +++ b/include/mupdf/pdf/crypt.h @@ -26,7 +26,7 @@ void pdf_write_digest(fz_context *ctx, fz_output *out, pdf_obj *byte_range, int /* pdf_signature_widget_byte_range: retrieve the byte range for a signature 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_signature_widget_contents: retrieve the contents for a signature widget diff --git a/include/mupdf/pdf/pdf-pkcs7.h b/include/mupdf/pdf/pdf-pkcs7.h index 8f11a6b4..237a036d 100644 --- a/include/mupdf/pdf/pdf-pkcs7.h +++ b/include/mupdf/pdf/pdf-pkcs7.h @@ -24,7 +24,7 @@ typedef struct pdf_pkcs7_designated_name_s pdf_pkcs7_designated_name; /* Check a signature's digest against ranges of bytes drawn from a stream */ -SignatureError pdf_pkcs7_check_digest(fz_context *ctx, fz_stream *stm, char *sig, int sig_len, int (*byte_range)[2], int byte_range_len); +SignatureError pdf_pkcs7_check_digest(fz_context *ctx, fz_stream *stm, char *sig, int sig_len); /* Check a singature's certificate is trusted */ SignatureError pdf_pkcs7_check_certificate(char *sig, int sig_len); @@ -48,7 +48,7 @@ void pdf_pkcs7_drop_signer(fz_context *ctx, pdf_pkcs7_signer *signer); pdf_pkcs7_designated_name *pdf_pkcs7_signer_designated_name(fz_context *ctx, pdf_pkcs7_signer *signer); /* Create a signature based on ranges of bytes drawn from a steam */ -int pdf_pkcs7_create_digest(fz_context *ctx, fz_stream *in, int brange[][2], int brange_len, pdf_pkcs7_signer *signer, unsigned char *digest, int *digest_len); +int pdf_pkcs7_create_digest(fz_context *ctx, fz_stream *in, pdf_pkcs7_signer *signer, unsigned char *digest, int *digest_len); /* Report whether pkcs7 is supported in the current build */ int pdf_pkcs7_supported(fz_context *ctx); |