summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-10-28 18:33:47 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-28 18:34:14 +0200
commit5c33253daf23224424cf6b181a2c2235c4a82539 (patch)
treeb99b284f811702a4f3e8e776d82d26f092367d31 /xmlsecurity/inc
parent56cc352d8229c16604f39a21bd77a05b422470f4 (diff)
xmlsecurity PDF verify: start using offsets from xref streams
This is needed (but not enough) to verify PDF 1.5 signatures. What's missing next is support for object streams. Change-Id: I5afec0a77839ffabe0aaa07e367064210535a1a9
Diffstat (limited to 'xmlsecurity/inc')
-rw-r--r--xmlsecurity/inc/pdfio/pdfdocument.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx b/xmlsecurity/inc/pdfio/pdfdocument.hxx
index 80a8de68f1fd..95663e6c190b 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -63,11 +63,17 @@ class XMLSECURITY_DLLPUBLIC PDFDocument
std::map<size_t, size_t> m_aXRef;
/// Object ID <-> "are changed as part of an incremental update?" map.
std::map<size_t, bool> m_aXRefDirty;
+ /// Object offset <-> Object pointer map.
+ std::map<size_t, PDFObjectElement*> m_aOffsetObjects;
+ /// Object ID <-> Object pointer map.
+ std::map<size_t, PDFObjectElement*> m_aIDObjects;
/// List of xref offsets we know.
std::vector<size_t> m_aStartXRefs;
/// List of EOF offsets we know.
std::vector<size_t> m_aEOFs;
PDFTrailerElement* m_pTrailer;
+ /// When m_pTrailer is nullptr, this can still have a dictionary.
+ PDFObjectElement* m_pXRefStream;
/// All editing takes place in this buffer, if it happens.
SvMemoryStream m_aEditBuffer;
@@ -93,6 +99,7 @@ public:
std::vector<PDFObjectElement*> GetPages();
/// Remember the end location of an EOF token.
void PushBackEOF(size_t nOffset);
+ const std::map<size_t, PDFObjectElement*>& GetIDObjects() const;
/// Read elements from the start of the stream till its end.
bool Read(SvStream& rStream);