xmlsecurity/source/helper/xsecctl.cxx  |    4 +++-
 xmlsecurity/source/helper/xsecsign.cxx |    6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 087705c72dcf555951c49b95476568adbab74edf
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Nov 15 21:12:11 2016 +0200

    Add the Target for xd:QualifyingProperties
    
    Change-Id: Ic15c34c77ff24a506b59ed02db3cfbb6722d0f25

diff --git a/xmlsecurity/source/helper/xsecctl.cxx 
b/xmlsecurity/source/helper/xsecctl.cxx
index 46de812..2223ef0 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -883,9 +883,11 @@ void XSecController::exportSignature(
                 "Object",
                 cssu::Reference< cssxs::XAttributeList > (pAttributeList));
             {
+                pAttributeList = new SvXMLAttributeList();
+                pAttributeList->AddAttribute("Target", "#" + 
signatureInfo.ouSignatureId);
                 xDocumentHandler->startElement(
                     "xd:QualifyingProperties",
-                    cssu::Reference< cssxs::XAttributeList > (new 
SvXMLAttributeList()));
+                    cssu::Reference< cssxs::XAttributeList > (pAttributeList));
                 
DocumentSignatureHelper::writeSignedProperties(xDocumentHandler, signatureInfo, 
sDate);
                 writeUnsignedProperties(xDocumentHandler, signatureInfo);
                 xDocumentHandler->endElement( "xd:QualifyingProperties" );
commit 108b0a5e37d649ee8b2b41a6695e03032d648226
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Nov 15 20:16:07 2016 +0200

    Sign also the xd:SignedProperties
    
    Change-Id: If5793cd8a721ac5b4fce5280b6180f2827c72501

diff --git a/xmlsecurity/source/helper/xsecsign.cxx 
b/xmlsecurity/source/helper/xsecsign.cxx
index a838a9c..a43e75b 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -168,6 +168,12 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > 
XSecController::prepar
         
internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, 
digestID, internalSignatureInfor.signatureInfor.ouPropertyId, -1 );
         size++;
 
+        if (bXAdESCompliantIfODF)
+        {
+            
internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, 
digestID, "idSignedProperties", -1);
+            size++;
+        }
+
         if (!internalSignatureInfor.signatureInfor.ouDescription.isEmpty())
         {
             // Only mention the hash of the description in the signature if 
it's non-empty.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to