我正在尝试传递给一个函数并使用根标签<NextMsg ID="Edoc">2019-09-20T14:57:46</NextMsg>中包含的数字签名对其进行签名<EDoc></Edoc>
这是预期的结果:
<?xml version="1.0" encoding="UTF-8"?>
<EDoc>
<NextMsg ID="Edoc">2019-09-20T14:57:46</NextMsg>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DS_A2B2112853C1478C8860CB8DC6FA23D2">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<Reference URI="">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<DigestValue>op0/fC+H5/0h7AGdUiEaNnNzd9WXs3VDouQQhRk8XgU=</DigestValue>
</Reference>
<Reference URI="#SP_A2B2112853C1478C8860CB8DC6FA23D2" Type="http://uri.etsi.org/01903/v1.1.1#SignedProperties">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<DigestValue>Kv75qkIImVnf9H7PZV+1er1n8YIBY5yRGXdpWSUIAX4=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>=sign-value=</SignatureValue>
<ds:Object xmlns="http://uri.etsi.org/01903/v1.1.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<QualifyingPropertiesReference URI="http://www.test.com"/>
<QualifyingProperties Target="#DS_A2B2112853C1478C8860CB8DC6FA23D2">
<SignedProperties Id="SP_A2B2112853C1478C8860CB8DC6FA23D2">
<SignedSignatureProperties>
<SigningTime>2019-09-20T14:57:48+03:00</SigningTime>
<SigningCertificate>
明月笑刀无情
相关分类