summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-11-04 10:18:08 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-11-04 12:32:40 +0100
commitd0edff60c786c4975b433890d277397673871418 (patch)
tree43ca54ff840ad101c42989aec6d2c1a30989ed20 /xmlsecurity/inc
parent8e38964c32b124be7a2acfbdeeb6dba96e77b9e8 (diff)
xmlsecurity PDF NSS verify: handle SHA1_WITH_RSA
SHA1_WITH_RSA is a signing algorithm, not a digest one, but let's accept it, so LO on Linux can verify a signature generated by LO on Windows. It's annoying that equivalent mapping in NSS is not part of their public API. Change-Id: I97186fcc1d118f922e5ee3cb472aa5b52bc4b5ca
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 37457c024d42..ca70c94ffbe3 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -116,6 +116,8 @@ public:
PDFDocument();
PDFDocument& operator=(const PDFDocument&) = delete;
PDFDocument(const PDFDocument&) = delete;
+ /// @name Low-level functions, to be used by PDFElement subclasses.
+ //@{
static OString ReadKeyword(SvStream& rStream);
static size_t FindStartXRef(SvStream& rStream);
void ReadXRef(SvStream& rStream);
@@ -136,13 +138,17 @@ public:
bool Tokenize(SvStream& rStream, TokenizeMode eMode, std::vector< std::unique_ptr<PDFElement> >& rElements, PDFObjectElement* pObject);
/// Register an object (owned directly or indirectly by m_aElements) as a provder for a given ID.
void SetIDObject(size_t nID, PDFObjectElement* pObject);
+ //@}
+ /// @name High-level functions, to be used by others.
+ //@{
/// Read elements from the start of the stream till its end.
bool Read(SvStream& rStream);
/// Sign the read document with xCertificate in the edit buffer.
bool Sign(const css::uno::Reference<css::security::XCertificate>& xCertificate, const OUString& rDescription);
/// Serializes the contents of the edit buffer.
bool Write(SvStream& rStream);
+ /// Get a list of signatures embedded into this document.
std::vector<PDFObjectElement*> GetSignatureWidgets();
/**
* @param rInformation The actual result.
@@ -152,6 +158,7 @@ public:
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);
+ //@}
};
} // namespace pdfio