Commit 2a31446b authored by Jeff Muizelaar's avatar Jeff Muizelaar
Browse files

2005-03-16 Jeff Muizelaar <jrmuizel@nit.ca>

	From Dan Sheridan <dan.sheridan@postman.org.uk>

	* poppler/XRef.cc (XRef::checkEncrypted):
	The key length should be 5 for revision 2 documents.
parent e632a1d4
2005-03-16 Jeff Muizelaar <jrmuizel@nit.ca>
From Dan Sheridan <dan.sheridan@postman.org.uk>
* poppler/XRef.cc (XRef::checkEncrypted):
The key length should be 5 for revision 2 documents.
2005-03-11 Kristian Høgsberg <krh@redhat.com>
From Jeff Muizelaar <jrmuizel@nit.ca>:
......
......@@ -822,6 +822,12 @@ GBool XRef::checkEncrypted(GooString *ownerPassword, GooString *userPassword) {
if (keyLength > 16) {
keyLength = 16;
}
/* special case for revision 2.
* See Algorithm 3.2 step 9 from PDF Reference, fifth edition.*/
if (encRevision == 2) {
keyLength = 5;
}
permFlags = permissions.getInt();
if (encVersion >= 1 && encVersion <= 2 &&
encRevision >= 2 && encRevision <= 3) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment