Commit 71cc344d authored by Albert Astals Cid's avatar Albert Astals Cid

Remove PDFDoc::countSignatures

parent c68954dd
......@@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net>
// Copyright (C) 2005, 2007-2009, 2011-2014 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005, 2007-2009, 2011-2015 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2008 Julien Rebetez <julienr@svn.gnome.org>
// Copyright (C) 2008, 2010 Pino Toscano <pino@kde.org>
// Copyright (C) 2008, 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
......@@ -456,11 +456,6 @@ GBool PDFDoc::checkEncryption(GooString *ownerPassword, GooString *userPassword)
return ret;
}
unsigned int PDFDoc::countSignatures()
{
return getSignatureWidgets().size();
}
std::vector<FormWidgetSignature*> PDFDoc::getSignatureWidgets()
{
int num_pages = getNumPages();
......
......@@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net>
// Copyright (C) 2005, 2009, 2014 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005, 2009, 2014, 2015 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2008 Julien Rebetez <julienr@svn.gnome.org>
// Copyright (C) 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
......@@ -205,7 +205,6 @@ public:
// Is the file encrypted?
GBool isEncrypted() { return xref->isEncrypted(); }
unsigned int countSignatures();
std::vector<FormWidgetSignature*> getSignatureWidgets();
// Check various permissions.
......
......@@ -134,7 +134,8 @@ int main(int argc, char *argv[])
goto end;
}
sigCount = doc->countSignatures();
sig_widgets = doc->getSignatureWidgets();
sigCount = sig_widgets.size();
if (sigCount >= 1) {
printf("Digital Signature Info of: %s\n", fileName->getCString());
......@@ -144,11 +145,7 @@ int main(int argc, char *argv[])
goto end;
}
sig_widgets = doc->getSignatureWidgets();
if (sig_widgets.size() == 0)
goto end;
for(unsigned int i = 0; i < sigCount; i++) {
for (unsigned int i = 0; i < sigCount; i++) {
sig_info = sig_widgets.at(i)->validateSignature(!dontVerifyCert, false);
printf("Signature #%d:\n", i+1);
printf(" - Signer Certificate Common Name: %s\n", sig_info->getSignerName());
......
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