From ac4f72884effe8c177f09d27bf4977c84eb3ec58 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 19 Aug 2009 02:39:58 +0200 Subject: Implement support for AES encryption. --- apps/common/pdftool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/common/pdftool.c') 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) -- cgit v1.2.3