【问题标题】:XAdES-EPES extended to XAdES-T, don't include "xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#" in QualifyingPropertiesXAdES-EPES 扩展到 XAdES-T,在 QualifyingProperties 中不包含“xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#"
【发布时间】:2015-02-04 09:39:17
【问题描述】:

我有一个 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");
}

【问题讨论】:

    标签: xades4j


    【解决方案1】:

    xades4j 当前执行 XML 序列化的方式总是添加该命名空间声明,即使没有任何元素使用它。没有办法配置它。我只想在必要时添加它,但这个问题还没有解决。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-18
      • 2022-06-24
      • 1970-01-01
      相关资源
      最近更新 更多