poppler/SecurityHandler.cc | 19 ++----------------- poppler/SecurityHandler.h | 6 ------ 2 files changed, 2 insertions(+), 23 deletions(-)
New commits: commit 12a657c5f787605602bb2ad9d79ef719bbf7678f Author: Albert Astals Cid <[email protected]> Date: Thu Jan 9 14:58:15 2020 +0100 Remove getAuthData function that did "nothing" diff --git a/poppler/SecurityHandler.cc b/poppler/SecurityHandler.cc index 575e5912..eea78117 100644 --- a/poppler/SecurityHandler.cc +++ b/poppler/SecurityHandler.cc @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2010, 2012, 2015, 2017, 2018 Albert Astals Cid <[email protected]> +// Copyright (C) 2010, 2012, 2015, 2017, 2018, 2020 Albert Astals Cid <[email protected]> // Copyright (C) 2013 Adrian Johnson <[email protected]> // Copyright (C) 2014 Fabio D'Urso <[email protected]> // Copyright (C) 2016 Alok Anand <[email protected]> @@ -65,27 +65,16 @@ SecurityHandler::~SecurityHandler() { bool SecurityHandler::checkEncryption(const GooString *ownerPassword, const GooString *userPassword) { void *authData; - bool ok; - int i; if (ownerPassword || userPassword) { authData = makeAuthData(ownerPassword, userPassword); } else { authData = nullptr; } - ok = authorize(authData); + const bool ok = authorize(authData); if (authData) { freeAuthData(authData); } - for (i = 0; !ok && i < 3; ++i) { - if (!(authData = getAuthData())) { - break; - } - ok = authorize(authData); - if (authData) { - freeAuthData(authData); - } - } if (!ok) { if (!ownerPassword && !userPassword) { GooString dummy; @@ -310,10 +299,6 @@ void *StandardSecurityHandler::makeAuthData(const GooString *ownerPassword, : nullptr); } -void *StandardSecurityHandler::getAuthData() { - return nullptr; -} - void StandardSecurityHandler::freeAuthData(void *authData) { delete (StandardAuthData *)authData; } diff --git a/poppler/SecurityHandler.h b/poppler/SecurityHandler.h index 0c9147e6..57d5c15d 100644 --- a/poppler/SecurityHandler.h +++ b/poppler/SecurityHandler.h @@ -66,11 +66,6 @@ public: virtual void *makeAuthData(const GooString *ownerPassword, const GooString *userPassword) = 0; - // Construct authorization data, typically by prompting the user for - // a password. Returns an authorization data object, or NULL to - // cancel. - virtual void *getAuthData() = 0; - // Free the authorization data returned by makeAuthData or // getAuthData. virtual void freeAuthData(void *authData) = 0; @@ -109,7 +104,6 @@ public: bool isUnencrypted() const override; void *makeAuthData(const GooString *ownerPassword, const GooString *userPassword) override; - void *getAuthData() override; void freeAuthData(void *authData) override; bool authorize(void *authData) override; int getPermissionFlags() const override { return permFlags; } _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
