Kaydet (Commit) ea3a5036 authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#119309 xmlsecurity xades: missing XML attribute on idSignedProperties ref

The AdES validator at
<https://ec.europa.eu/cefdigital/DSS/webapp-demo/validation> recently
learned to deal with ODF files, this improves its output, so that
"Qualification Signature" section is no longer just a red "N/A" but an
orange "Indeterminate QESig".

Change-Id: I5f47b935f1dbfa4e2eee4654db31403479cb571d
Reviewed-on: https://gerrit.libreoffice.org/59633
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 1a4bc964
......@@ -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()
......
......@@ -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) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment