我有一个 XAdES-EPES 签名,然后我使用 XAdES-4j 将签名扩展到 XAdES-T。问题是在原始签名中 QualifyingProperties 是:
<xades:QualifyingProperties Id="Signature-b8925056-3e5e-4a39-8e4c-7fc1286b5eb5-QualifyingProperties" Target="#Signature-b8925056-3e5e-4a39-8e4c-7fc1286b5eb5-Signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#">
在扩展签名 QualifyingProperties 中是:
<xades:QualifyingProperties Id="Signature-b8925056-3e5e-4a39-8e4c-7fc1286b5eb5-QualifyingProperties" Target="#Signature-b8925056-3e5e-4a39-8e4c-7fc1286b5eb5-Signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#">
如何在不添加xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#"到 QualifyingProperties 的情况下扩展签名?
提前致谢!
编辑:在我找到解决方案之前,我正在做:
Element qualifyingProperties = null;
final NodeList nlist = xmlSig.getDocument().getElementsByTagName("xades:QualifyingProperties");
if (nlist.getLength() != 0) {
qualifyingProperties = (Element) nlist.item(0);
qualifyingProperties.removeAttribute("xmlns:xades141");
}