[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - xmlsecurity/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Mon Jul 17 23:08:32 UTC 2017
xmlsecurity/source/helper/xsecctl.cxx | 11 +++++++----
xmlsecurity/source/helper/xsecparser.cxx | 4 ++--
2 files changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 20d4c21c7f167559998526e36fb4859b41f2bf1f
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Mon Jul 17 13:13:06 2017 +0200
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 at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit 9127706ab39cd39da7a8b9a13acb553a77968890)
Change-Id: I2cc0ae24eefc9137d2e3432da1d65e44245c7616
Reviewed-on: https://gerrit.libreoffice.org/40068
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
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;
More information about the Libreoffice-commits
mailing list