summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-07-17 13:13:06 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-07-18 01:07:57 +0200
commit20d4c21c7f167559998526e36fb4859b41f2bf1f (patch)
treebfdb078a9ec49222bae1306fe03d0b199810472a /xmlsecurity
parentd9feaf67be30e7a2aa729db93e489c61f57bb580 (diff)
gpg4libre: Wrap PGPOwner in own namespace
as recommended by W3C: https://www.w3.org/TR/xmldsig-core/#sec-PGPData Reviewed-on: https://gerrit.libreoffice.org/40058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 9127706ab39cd39da7a8b9a13acb553a77968890) Change-Id: I2cc0ae24eefc9137d2e3432da1d65e44245c7616 Reviewed-on: https://gerrit.libreoffice.org/40068 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx11
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx4
2 files changed, 9 insertions, 6 deletions
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index d85c39dbf974..f0fadc751a36 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -726,10 +726,13 @@ void XSecController::exportSignature(
// GPG or X509 key?
if (!signatureInfo.ouGpgCertificate.isEmpty())
{
+ pAttributeList = new SvXMLAttributeList();
+ pAttributeList->AddAttribute("xmlns:loext",
+ "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0");
/* Write PGPData element */
xDocumentHandler->startElement(
"PGPData",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ cssu::Reference< cssxs::XAttributeList > (pAttributeList));
{
/* Write keyid element */
xDocumentHandler->startElement(
@@ -750,10 +753,10 @@ void XSecController::exportSignature(
/* Write PGPOwner element */
xDocumentHandler->startElement(
- "PGPOwner",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ "loext:PGPOwner",
+ cssu::Reference< cssxs::XAttributeList >(new SvXMLAttributeList()));
xDocumentHandler->characters( signatureInfo.ouGpgOwner );
- xDocumentHandler->endElement( "PGPOwner" );
+ xDocumentHandler->endElement( "loext:PGPOwner" );
}
xDocumentHandler->endElement( "PGPData" );
}
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index 1c1098c37261..9ad779261080 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -196,7 +196,7 @@ void SAL_CALL XSecParser::startElement(
m_ouGpgCertificate.clear();
m_bInGpgCertificate = true;
}
- else if (aName == "PGPOwner")
+ else if (aName == "loext:PGPOwner")
{
m_ouGpgOwner.clear();
m_bInGpgOwner = true;
@@ -324,7 +324,7 @@ void SAL_CALL XSecParser::endElement( const OUString& aName )
m_pXSecController->setGpgCertificate( m_ouGpgCertificate );
m_bInGpgCertificate = false;
}
- else if (aName == "PGPOwner")
+ else if (aName == "loext:PGPOwner")
{
m_pXSecController->setGpgOwner( m_ouGpgOwner );
m_bInGpgOwner = false;