XadessignedProperties的哈希值不准确
I have an UBL XML file and need to hash sha256 for xadesSignedProperties
and the part need to be hash is :
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="signature">
<xades:SignedProperties Id="xadesSignedProperties">
<xades:SignedSignatureProperties>
<xades:SigningTime>2021-02-25T12:57:51Z</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>9ef6c0b90ae609868bb614772e1d5375464ed1a1793ded751feb1e3414980f7c</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=CommonName,O=GAZT,L=Katowice,ST=Silesia,C=PL</ds:X509IssuerName>
<ds:X509SerialNumber>15007377309689649296</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
The value it should be this 2ab365b063238318fdeac9c2957b135ef8a6727691fc4d81982b5bdd2cec9792
:
<ds:Reference Type="http://www.w3.org/2000/09/xmldsig#SignatureProperties"
URI="#xadesSignedProperties">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>2ab365b063238318fdeac9c2957b135ef8a6727691fc4d81982b5bdd2cec9792</ds:DigestValue>
</ds:Reference>
but don't know how要获得相同的摘要?
对此有任何想法吗?
I have an UBL XML file and need to hash sha256 for xadesSignedProperties
and the part need to be hash is :
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="signature">
<xades:SignedProperties Id="xadesSignedProperties">
<xades:SignedSignatureProperties>
<xades:SigningTime>2021-02-25T12:57:51Z</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>9ef6c0b90ae609868bb614772e1d5375464ed1a1793ded751feb1e3414980f7c</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=CommonName,O=GAZT,L=Katowice,ST=Silesia,C=PL</ds:X509IssuerName>
<ds:X509SerialNumber>15007377309689649296</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
The value it should be this 2ab365b063238318fdeac9c2957b135ef8a6727691fc4d81982b5bdd2cec9792
:
<ds:Reference Type="http://www.w3.org/2000/09/xmldsig#SignatureProperties"
URI="#xadesSignedProperties">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>2ab365b063238318fdeac9c2957b135ef8a6727691fc4d81982b5bdd2cec9792</ds:DigestValue>
</ds:Reference>
but don't know how to get the same DigestValue?
Any Idea about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DS:参考删除不是“ Xades:fimelyingproperties”元素,而是“ Xades:signedProperties”元素的ID ='XadessignedProperties'。
参见 xmldsig 规范有关引用XML Nodes的更多详细信息。
因此,您需要在上面复制的节点上计算哈希,而是在“ Xades:signedproperties”及其内容上计算哈希。
The ds:Reference dereferences not the 'xades:QualifyingProperties' element, but the 'xades:SignedProperties' element by its Id='xadesSignedProperties'.
See XMLDSig specification for more details about referencing XML nodes.
Therefore, you need to compute hash not on the node copied above, but on the 'xades:SignedProperties' and its content.