Age | Commit message (Collapse) | Author |
|
Use the MUPDF_EXTRA_CFLAGS, CPPFLAGS, LDLIBS, and LDFLAGS variables.
|
|
Adds a requirement on the caller to free the returned strings.
|
|
|
|
|
|
|
|
Remove direct inclusion of pkcs7 source from the mupdf project and
create a separate libpkcs7 project with others as dependants
|
|
Add a version of pdf_check_signature function that reports no support,
for builds without openssl. This allows the removal of ifdefs from the
apps.
|
|
|
|
The mupdf build included an implimentation of the pkcs7 functions that
are needed for signing documents and verifying signatures, the
implementation being either an openssl-based one, or a stub that returned
errors. This commit removes the pkcs7 functions from the main mupdf
library.
For the sake of verification, there wasn't really a need for the pkcs7
functions to be part of mupdf. It was only the checking function that used
them. The checking function is now provided as a helper, outside of the
main build. The openssl-based pkcs7 functions area also supplied as a
helper. Users wishing to verify signatures can either use the checking
function directly, or use the source on which to base their own.
Document signing requires more integration between mupdf and pkcs7
because part of the process is performed at time of signing and part when
saving the document. Mupdf already had a pdf_pkcs7_signer object that
kept information between the two phases. That object has now been extended
to include the pkcs7 functions involved in signing, and the signing
function now requires such an object, rather than a file path to a
certificate. The openssl-based pkcs7 helper provides a function that, given
the path to a certificate, will return a pdf_pkcs7_signer object.
The intention is that different implementations can be produced for
different platforms, based on cryptographic routines built into the
operationg system. In each case, for the sake of document signing, the
routines would be wrapped up as a pdf_pkcs7_signer object.
|
|
Previously, pdf-pkcs7.c contained mishmash of functions required
for creating and checking signatures, with no separation between
the parts relating to pdf and those relating to pkcs7. This
commit introduces pdf_signature.c which contains the pdf
specifics, leaving pdf-pkcs7.c to be purely pkcs7 functions.
This should more easily allow the use of pkcs7 solutions other
than openssl. The pkcs7 api is declared in pdf-pkcs7.h. It is
entirely free of mupdf specifics, other than using an fz_stream
to specify the bytes to be hashed.
|
|
|
|
|
|
|
|
|
|
This will allow us to read and write documents using I/O written
in Java, exposed by SeekableInputStream and SeekableOutputStream.
We supply an example FileStream which implements seekable streams
backed by a RandomAccessFile.
|
|
Previously, signature verification worked only for file-based documents
and the file path had to be passed into the verification function.
|
|
Without deleteing it the local reference table may overflow.
|
|
|
|
|
|
|
|
This allows us to clean up memory so we can check for memory leaks.
Also fix one memory leak.
|
|
|
|
Also clarify that a copy of author/contents is returned, and that
the caller must free them.
|
|
This mirrors the existing PDFObject.asByteString().
|
|
|
|
|
|
|
|
When iterating through blocks, make sure to include
text blocks. After building the char array for a
given line, be sure to add it to the line object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously the counts and points arrays would leak if
GetFloatArrayRegion() threw an exception.
|
|
Previously the initialization order of init() and the field inited
was not obvious. Move the static block as far up as possible but
make sure that inited is initialized before that. Also add a comment
explaining why.
|
|
This way the MuPDF library itself only uses fz_snprintf for
consistent formatting.
|
|
|
|
|
|
|
|
glutMainLoopEvent does not sleep for events, so use glutMainLoop instead
and destroy the window when 'q' is pressed rather than just setting the
quit flag.
|
|
|
|
|
|
|
|
|
|
We currently don't handle errors here, but if we do in the future we
don't want stale pointers lying around.
|
|
|
|
GLFW doesn't build on Visual Studio 2005 anymore, and I don't have time to keep
up with the changes.
So, we're switching back to FreeGLUT, which is more stable.
I've added the two missing features that made us switch to GLFW in the first
place: input methods and system clipboard support.
If MuPDF is compiled with our version of FreeGLUT, we now use these functions:
* glutKeyboardExtFunc
* glutSetClipboard
* glutGetClipboard
|
|
|