summaryrefslogtreecommitdiff
path: root/apps/common/pdftool.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2009-08-19 02:39:58 +0200
committerTor Andersson <tor@ghostscript.com>2009-08-19 02:39:58 +0200
commitac4f72884effe8c177f09d27bf4977c84eb3ec58 (patch)
tree5f0eafafab91d1dc07434f0a23b19399c6682818 /apps/common/pdftool.c
parent1d2eb9d542b11e488dbd206c6ef9936b4f60fc13 (diff)
downloadmupdf-ac4f72884effe8c177f09d27bf4977c84eb3ec58.tar.xz
Implement support for AES encryption.
Diffstat (limited to 'apps/common/pdftool.c')
-rw-r--r--apps/common/pdftool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/common/pdftool.c b/apps/common/pdftool.c
index 5de9e1b6..025dcd9b 100644
--- a/apps/common/pdftool.c
+++ b/apps/common/pdftool.c
@@ -50,9 +50,9 @@ void openxref(char *filename, char *password, int dieonbadpass)
if (error)
die(error);
- if (xref->crypt)
+ if (pdf_needspassword(xref))
{
- okay = pdf_setpassword(xref->crypt, password);
+ okay = pdf_authenticatepassword(xref, password);
if (!okay && !dieonbadpass)
fz_warn("invalid password, attempting to continue.");
else if (!okay && dieonbadpass)