我在验证使用 xades4j 签名的封装 xml 时遇到问题,我得到的错误是“URI #data 的参考没有 XMLSignatureInput”,其中“#data”是我在 c# 验证中签名的 xml 验证通过的 uri
这是xml:
<?xml version="1.0" encoding="UTF-8"?><Envelope xmlns="urn:Zahtev"><root Id="data"><Identifikacija><IDZahteva>D1CC353F-6F04-47A4-B900-31944E2A1D53</IDZahteva></Identifikacija></root><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Potpis_RA_Agenta">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#data">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>IWMyfvcgZm3ElP6TfWtqTtGjEos=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#SignedPropertiesId" Type="http://uri.etsi.org/01903#SignedProperties">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>WBLe3LJ12+hQ3OyTClnQcK2crF0=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue Id="Vrednost_za_Potpis_RA_Agenta">
...
</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>
..
</ds:X509Certificate>
</ds:X509Data>
<ds:KeyValue>
<ds:RSAKeyValue>
<ds:Modulus>
....
</ds:Modulus>
<ds:Exponent>AQAB</ds:Exponent>
</ds:RSAKeyValue>
</ds:KeyValue>
</ds:KeyInfo>
<ds:Object Id="XadesObject">.....</ds:Object>
</ds:Signature></Envelope>
谢谢