summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-21 16:26:11 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-21 17:02:28 +0000
commit9be498dac23a48f45d6a63e69dfca83622c9cdf5 (patch)
tree50e32f6aa373183496d11d947adaad16b376a93b /include
parent46a71fa01a2268a0a6e02ed04ece3094153ab247 (diff)
xmlsecurity: separate signature verification from PDF tokenizer
Signature verification code depends on sax and xmloff, but the rest of the PDF tokenizer could be otherwise moved down to lower layers without problems. Change-Id: Ieca57279e9517935821c1d34f217fd10548035ef Reviewed-on: https://gerrit.libreoffice.org/35512 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include')
-rw-r--r--include/xmlsecurity/pdfio/pdfdocument.hxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/xmlsecurity/pdfio/pdfdocument.hxx b/include/xmlsecurity/pdfio/pdfdocument.hxx
index 5f64b650ed17..f5179fd4af6d 100644
--- a/include/xmlsecurity/pdfio/pdfdocument.hxx
+++ b/include/xmlsecurity/pdfio/pdfdocument.hxx
@@ -254,8 +254,6 @@ class XMLSECURITY_DLLPUBLIC PDFDocument
SvMemoryStream m_aEditBuffer;
static int AsHex(char ch);
- /// Decode a hex dump.
- static std::vector<unsigned char> DecodeHexString(PDFHexStringElement* pElement);
/// Suggest a minimal, yet free signature ID to use for the next signature.
sal_uInt32 GetNextSignature();
/// Write the signature object as part of signing.
@@ -277,6 +275,8 @@ public:
PDFDocument(const PDFDocument&) = delete;
/// @name Low-level functions, to be used by PDFElement subclasses.
//@{
+ /// Decode a hex dump.
+ static std::vector<unsigned char> DecodeHexString(PDFHexStringElement* pElement);
static OString ReadKeyword(SvStream& rStream);
static size_t FindStartXRef(SvStream& rStream);
void ReadXRef(SvStream& rStream);
@@ -309,17 +309,18 @@ public:
bool Write(SvStream& rStream);
/// Get a list of signatures embedded into this document.
std::vector<PDFObjectElement*> GetSignatureWidgets();
- /**
- * @param rInformation The actual result.
- * @param bLast If this is the last signature in the file, so it covers the whole file physically.
- * @return If we can determinate a result.
- */
- static bool ValidateSignature(SvStream& rStream, PDFObjectElement* pSignature, SignatureInformation& rInformation, bool bLast);
/// Remove the nth signature from read document in the edit buffer.
bool RemoveSignature(size_t nPosition);
//@}
};
+/**
+ * @param rInformation The actual result.
+ * @param bLast If this is the last signature in the file, so it covers the whole file physically.
+ * @return If we can determinate a result.
+ */
+XMLSECURITY_DLLPUBLIC bool ValidateSignature(SvStream& rStream, PDFObjectElement* pSignature, SignatureInformation& rInformation, bool bLast);
+
} // namespace pdfio
} // namespace xmlsecurity