Hi Raul,
for the input document have a look to the attachment and create a XML
sigantrue instance out of it and then do something like as following....
XMLSignature sig = new XMLSignature(signature,
this.mfDefaultBaseURI);
KeyInfo keyinfo = sig.getKeyInfo();
X509Data data = keyinfo.itemX509Data(i);
the itemX509Data(...) would loop (without the fix, of course ;-))
hope it helps,
Eckehard
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Freitag, 6. August 2004 20:27
To: [EMAIL PROTECTED]
Subject: Re: Looping in package
org.apache.xml.security.keys.content.X509Data
> Hi all,
>
> my application loops in the X509Data(Element element, String BaseURI)
> constructor of the org.apache.xml.security.keys.content.X509Data
> class. Adding
>
> sibling=sibling.getNextSibling();
>
> before the end of the 'while' (line 116), fixed it for me. So probably
> it would fix this problem in generell.
>
> regards,
>
Thanks a lot. I have fix it in CVS. It seems that there is no automatic
testing for this. Can you send me the xml that has detect the error, so
i can add a test to the testsuite?
Regards,
Raul Benito,
http://r-bg.com
<?xml version="1.0" encoding="UTF-8"?><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/><ds:Reference URI="#ManifestObjectNode" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/></ds:Reference></ds:SignedInfo><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:KeyValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:RSAKeyValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:Modulus xmlns:ds="http://www.w3.org/2000/09/xmldsig#">ninYeOGuvuOSUOnU9uGOgPqUlaUjfWjJDs3LQJNr3oaqE8Ww8Klu0TYGvdsKYdH+NSWlD7bTy2WE
Zzj7a84DABz33NKfPs7CJz1Vrqk9MP1+gOKfFoY3KJkiEeak97rxwdXjvjKRwHcxGABpZiK5ZZ7z
Ycgi/IdF72aPsQnshNM=
</ds:Modulus><ds:Exponent xmlns:ds="http://www.w3.org/2000/09/xmldsig#">AQAB
</ds:Exponent></ds:RSAKeyValue></ds:KeyValue><ds:X509Data xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:X509Certificate xmlns:ds="http://www.w3.org/2000/09/xmldsig#">MIICNDCCAZ0CBD4ul5wwDQYJKoZIhvcNAQEEBQAwYTELMAkGA1UEBhMCR0UxDzANBgNVBAgTBkhl
c3NlbjESMBAGA1UEBxMJRGFybXN0YWR0MQwwCgYDVQQKEwNTQUcxETAPBgNVBAsTCFNlY3VyaXR5
MQwwCgYDVQQDEwN6c2EwHhcNMDMwMTIyMTMwNzQwWhcNMDMwNDIyMTMwNzQwWjBhMQswCQYDVQQG
EwJHRTEPMA0GA1UECBMGSGVzc2VuMRIwEAYDVQQHEwlEYXJtc3RhZHQxDDAKBgNVBAoTA1NBRzER
MA8GA1UECxMIU2VjdXJpdHkxDDAKBgNVBAMTA3pzYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
gYEAninYeOGuvuOSUOnU9uGOgPqUlaUjfWjJDs3LQJNr3oaqE8Ww8Klu0TYGvdsKYdH+NSWlD7bT
y2WEZzj7a84DABz33NKfPs7CJz1Vrqk9MP1+gOKfFoY3KJkiEeak97rxwdXjvjKRwHcxGABpZiK5
ZZ7zYcgi/IdF72aPsQnshNMCAwEAATANBgkqhkiG9w0BAQQFAAOBgQBZJdoCDtjz2OsiIzRlI4Fp
R7r5OrXbKg4QmqSHG//o7q6ZYT+JPEEgSsDkqwqDla0p6g6I9SUVxNA5U3vkWTJyircErBcO7qr0
y5nxhl1ng+au5PXQRLgTcdNfA3+w+1Jcp2DLZhu8FAU/GfP3O6IKaivXn+G25B3v4Nw6lltI0w==
</ds:X509Certificate></ds:X509Data></ds:KeyInfo><ds:Object Id="ManifestObjectNode" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:Manifest xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:Reference URI="http://www.softwareag.com/corporat/default.htm" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/></ds:Reference></ds:Manifest></ds:Object></ds:Signature>