summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx4
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx8
2 files changed, 12 insertions, 0 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 54920f5958b1..1e68d08b2d15 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -775,6 +775,10 @@ void SigningTest::testXAdES()
// Assert that the digest of the signing certificate is included.
assertXPath(pXmlDoc, "//xd:CertDigest", 1);
+
+ // Assert that the Type attribute on the idSignedProperties reference is
+ // not missing.
+ assertXPath(pXmlDoc, "/odfds:document-signatures/dsig:Signature/dsig:SignedInfo/dsig:Reference[@URI='#idSignedProperties']", "Type", "http://uri.etsi.org/01903#SignedProperties");
}
void SigningTest::testXAdESGood()
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 7a8422bc39e2..0ab4c39528fb 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -661,6 +661,14 @@ void XSecController::exportSignature(
pAttributeList->AddAttribute(
"URI",
"#" + refInfor.ouURI);
+
+ if (bXAdESCompliantIfODF && refInfor.ouURI == "idSignedProperties")
+ {
+ // The reference which points to the SignedProperties
+ // shall have this specific type.
+ pAttributeList->AddAttribute("Type",
+ "http://uri.etsi.org/01903#SignedProperties");
+ }
}
xDocumentHandler->startElement( "Reference", cssu::Reference< cssxs::XAttributeList > (pAttributeList) );