diff options
author | Paul Gardiner <paul.gardiner@artifex.com> | 2018-01-17 11:50:33 +0000 |
---|---|---|
committer | Paul Gardiner <paul.gardiner@artifex.com> | 2018-02-02 12:36:13 +0000 |
commit | 1ebb2db0aaa6b5212152dd0f32d781fa81b6bcaa (patch) | |
tree | ad7a0a44b27e3e0dde9a77634cc97d7c54cfb431 /include | |
parent | 7c94151aa9f39ea70268ecb4806b726372cae753 (diff) | |
download | mupdf-1ebb2db0aaa6b5212152dd0f32d781fa81b6bcaa.tar.xz |
Signature support: use an enum to report errors.
Previously, errors were reported with a boolean function return
with a char buffer filled out with the reason in the failure
case. Now an enum is used to report the various failure cases.
The function pdf_check_signature has been left as is so that
existing apps will not need changing.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/pdf/crypt.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/mupdf/pdf/crypt.h b/include/mupdf/pdf/crypt.h index e29da8ca..555a8d25 100644 --- a/include/mupdf/pdf/crypt.h +++ b/include/mupdf/pdf/crypt.h @@ -21,6 +21,18 @@ unsigned char *pdf_crypt_key(fz_context *ctx, pdf_document *doc); void pdf_print_crypt(fz_context *ctx, fz_output *out, pdf_crypt *crypt); +typedef enum +{ + SignatureError_Okay, + SignatureError_NoSignatures, + SignatureError_NoCertificate, + SignatureError_DocumentChanged, + SignatureError_SelfSigned, + SignatureError_SelfSignedInChain, + SignatureError_NotTrusted, + SignatureError_Unknown +} SignatureError; + typedef struct pdf_designated_name_s { char *cn; |