diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-11 15:14:50 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-11 17:30:02 +0100 |
commit | df4ebee2eff7f3766b604f4928ddf0f0f6e810bd (patch) | |
tree | 7aae8c05d177cada0c8184d7f3368e499b111cb7 | |
parent | d7d86dfe4a83dd49192efe167e50c19e75109cde (diff) |
xmlsecurity: import OOXML <X509SerialNumber>
Again, just to help the exporter not loose information.
Change-Id: Icc729d6a58321695fa59e009a328fca56d5ef514
-rw-r--r-- | xmlsecurity/source/helper/ooxmlsecparser.cxx | 13 | ||||
-rw-r--r-- | xmlsecurity/source/helper/ooxmlsecparser.hxx | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx index da2ed2c0f9b6..2086d3876283 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.cxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx @@ -20,6 +20,7 @@ OOXMLSecParser::OOXMLSecParser(XSecController* pXSecController) ,m_bInMdssiValue(false) ,m_bInSignatureComments(false) ,m_bInX509IssuerName(false) + ,m_bInX509SerialNumber(false) ,m_bReferenceUnresolved(false) { } @@ -106,6 +107,11 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception) m_aX509IssuerName.clear(); m_bInX509IssuerName = true; } + else if (rName == "X509SerialNumber") + { + m_aX509SerialNumber.clear(); + m_bInX509SerialNumber = true; + } if (m_xNextHandler.is()) m_xNextHandler->startElement(rName, xAttribs); @@ -152,6 +158,11 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) throw (xml::sax: m_pXSecController->setX509IssuerName(m_aX509IssuerName); m_bInX509IssuerName = false; } + else if (rName == "X509SerialNumber") + { + m_pXSecController->setX509SerialNumber(m_aX509SerialNumber); + m_bInX509SerialNumber = false; + } if (m_xNextHandler.is()) m_xNextHandler->endElement(rName); @@ -171,6 +182,8 @@ void SAL_CALL OOXMLSecParser::characters(const OUString& rChars) throw (xml::sax m_aSignatureComments += rChars; else if (m_bInX509IssuerName) m_aX509IssuerName += rChars; + else if (m_bInX509SerialNumber) + m_aX509SerialNumber += rChars; if (m_xNextHandler.is()) m_xNextHandler->characters(rChars); diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx index 1914d4ca50fd..819947baff8a 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.hxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx @@ -41,6 +41,8 @@ class OOXMLSecParser: public cppu::WeakImplHelper OUString m_aSignatureComments; bool m_bInX509IssuerName; OUString m_aX509IssuerName; + bool m_bInX509SerialNumber; + OUString m_aX509SerialNumber; /// Last seen <Reference URI="...">. OUString m_aReferenceURI; |