Commit 548648bf authored by Albert Astals Cid's avatar Albert Astals Cid

[xpdf303] Merge PDFDoc encryption related code

parent 6ee907f2
......@@ -419,7 +419,10 @@ GBool PDFDoc::checkEncryption(GooString *ownerPassword, GooString *userPassword)
xref->getTrailerDict()->dictLookup("Encrypt", &encrypt);
if ((encrypted = encrypt.isDict())) {
if ((secHdlr = SecurityHandler::make(this, &encrypt))) {
if (secHdlr->checkEncryption(ownerPassword, userPassword)) {
if (secHdlr->isUnencrypted()) {
// no encryption
ret = gTrue;
} else if (secHdlr->checkEncryption(ownerPassword, userPassword)) {
// authorization succeeded
xref->setEncryption(secHdlr->getPermissionFlags(),
secHdlr->getOwnerPasswordOk(),
......
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