"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xpdf/SecurityHandler.cc" between
xpdf-4.03.tar.gz and xpdf-4.04.tar.gz

About: Xpdf is a PDF viewer for X.

SecurityHandler.cc  (xpdf-4.03):SecurityHandler.cc  (xpdf-4.04)
skipping to change at line 206 skipping to change at line 206
cfLengthObj.free(); cfLengthObj.free();
encVersion = 2; encVersion = 2;
encRevision = 3; encRevision = 3;
encAlgorithm = cryptAES; encAlgorithm = cryptAES;
} else if (cfmObj.isName("AESV3")) { } else if (cfmObj.isName("AESV3")) {
if (cryptFilterObj.dictLookup("Length", if (cryptFilterObj.dictLookup("Length",
&cfLengthObj)->isInt()) { &cfLengthObj)->isInt()) {
fileKeyLength = cfLengthObj.getInt(); fileKeyLength = cfLengthObj.getInt();
} }
cfLengthObj.free(); cfLengthObj.free();
if (fileKeyLength == 16) { encVersion = 5;
// this isn't allowed by the spec, but Adobe supports it if (encRevision != 5 && encRevision != 6) {
encVersion = 2; encRevision = 6;
encRevision = 3;
encAlgorithm = cryptAES;
} else {
encVersion = 5;
if (encRevision != 5 && encRevision != 6) {
encRevision = 6;
}
encAlgorithm = cryptAES256;
} }
encAlgorithm = cryptAES256;
// The PDF 2.0 spec says Length and CF.Length are both deprecated.
// Acrobat X honors Length and ignores CF.Length.
// I think it's safest to ignore both.
fileKeyLength = 32;
} }
cfmObj.free(); cfmObj.free();
} }
cryptFilterObj.free(); cryptFilterObj.free();
} }
stringFilterObj.free(); stringFilterObj.free();
streamFilterObj.free(); streamFilterObj.free();
cryptFiltersObj.free(); cryptFiltersObj.free();
if (encryptDictA->dictLookup("EncryptMetadata", if (encryptDictA->dictLookup("EncryptMetadata",
&encryptMetadataObj)->isBool()) { &encryptMetadataObj)->isBool()) {
 End of changes. 2 change blocks. 
11 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)