RE: Looping in package org.apache.xml.security.keys.content.X509Data

2004-08-09 Thread Eckehard.Hermann
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

http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>http://www.w3.org/2000/09/xmldsig#rsa-sha1"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>http://www.w3.org/2000/09/xmldsig#sha1"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/2000/09/xmldsig#";>ninYeOGuvuOSUOnU9uGOgPqUlaUjfWjJDs3LQJNr3oaqE8Ww8Klu0TYGvdsKYdH+NSWlD7bTy2WE
Zzj7a84DABz33NKfPs7CJz1Vrqk9MP1+gOKfFoY3KJkiEeak97rxwdXjvjKRwHcxGABpZiK5ZZ7z
Ycgi/IdF72aPsQnshNM=
http://www.w3.org/2000/09/xmldsig#";>AQAB
http://www.w3.org/2000/09/xmldsig#";>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==
http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/2000/09/xmldsig#";>http://www.softwareag.com/corporat/default.htm"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>http://www.w3.org/2000/09/xmldsig#sha1"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>

[GUMP@brutus]: xml-security/xml-security failed

2004-08-09 Thread Sam Ruby
LCipherTester.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.external.org.apache.xalan.XPathAPI.AttributeAncestorOrSelfTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.external.org.apache.xalan.XPathAPI.XalanBug1425Test.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.interop.BaltimoreTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.interop.IAIKTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.interop.RSASecurityTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.signature.XMLSignatureInputTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.transforms.implementations.TransformBase64DecodeTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.utils.Base64Test.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.utils.resolver.ResourceResolverSpiTest.xml'
[junitreport] Using org.apache.xalan.processor Xalan Java 2.6.0
[junitreport] Transform time: 4229ms

BUILD FAILED
/usr/local/gump/public/workspace/xml-security/build.xml:396: Unit Tests Failed
at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:139)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:95)
at org.apache.tools.ant.Task.perform(Task.java:366)
at org.apache.tools.ant.Target.execute(Target.java:337)
at org.apache.tools.ant.Target.performTasks(Target.java:365)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1218)
at org.apache.tools.ant.Project.executeTarget(Project.java:1188)
at org.apache.tools.ant.Project.executeTargets(Project.java:1060)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.Main.start(Main.java:151)
at org.apache.tools.ant.Main.main(Main.java:241)

Total time: 22 seconds
-




To subscribe to this information via syndicated feeds:
 RSS: http://brutus.apache.org/gump/public/xml-security/xml-security/rss.xml
 Atom: http://brutus.apache.org/gump/public/xml-security/xml-security/atom.xml


--
Gump E-mail Identifier (within run) #17.
Produced by Gump 2.1.0-alpha-0002.
[Run (20040809 00:00:12, brutus:brutus-public:20040809 00:00:12)]
http://brutus.apache.org/gump/public/index.html
http://brutus.apache.org/gump/public/options.html

--
Apache Gump
http://gump.apache.org/ [Instance: brutus]


[GUMP@brutus]: xml-security/xml-security failed

2004-08-09 Thread Sam Ruby
LCipherTester.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.external.org.apache.xalan.XPathAPI.AttributeAncestorOrSelfTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.external.org.apache.xalan.XPathAPI.XalanBug1425Test.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.interop.BaltimoreTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.interop.IAIKTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.interop.RSASecurityTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.signature.XMLSignatureInputTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.transforms.implementations.TransformBase64DecodeTest.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.utils.Base64Test.xml'
[junitreport] Parsing file: 
'/usr/local/gump/public/workspace/xml-security/build/docs/xml/junit/TEST-org.apache.xml.security.test.utils.resolver.ResourceResolverSpiTest.xml'
[junitreport] Using org.apache.xalan.processor Xalan Java 2.6.0
[junitreport] Transform time: 4229ms

BUILD FAILED
/usr/local/gump/public/workspace/xml-security/build.xml:396: Unit Tests Failed
at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:139)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:95)
at org.apache.tools.ant.Task.perform(Task.java:366)
at org.apache.tools.ant.Target.execute(Target.java:337)
at org.apache.tools.ant.Target.performTasks(Target.java:365)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1218)
at org.apache.tools.ant.Project.executeTarget(Project.java:1188)
at org.apache.tools.ant.Project.executeTargets(Project.java:1060)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.Main.start(Main.java:151)
at org.apache.tools.ant.Main.main(Main.java:241)

Total time: 22 seconds
-




To subscribe to this information via syndicated feeds:
 RSS: http://brutus.apache.org/gump/public/xml-security/xml-security/rss.xml
 Atom: http://brutus.apache.org/gump/public/xml-security/xml-security/atom.xml


--
Gump E-mail Identifier (within run) #17.
Produced by Gump 2.1.0-alpha-0002.
[Run (20040809 00:00:12, brutus:brutus-public:20040809 00:00:12)]
http://brutus.apache.org/gump/public/index.html
http://brutus.apache.org/gump/public/options.html

--
Apache Gump
http://gump.apache.org/ [Instance: brutus]


Encryption Unit Test Failures

2004-08-09 Thread Vishal Mahajan
Some encryption unit tests are not passing on the head branch. I wanted 
to make sure that I am not the only one observing this. Details follow:

   [junit] Running org.apache.xml.security.test.encryption.BaltimoreEncTest
   [junit] Tests run: 10, Failures: 0, Errors: 5, Time elapsed: 7.176 sec
   [junit] Tests run: 9, Failures: 0, Errors: 1, Time elapsed: 42.137 sec
   [junit] Testsuite: 
org.apache.xml.security.test.encryption.XMLCipherTester

The exception stack trace is similar for all errors -
   [junit] Testcase: test_five_data_aes192_cbc_aes256Testcase: 
test_five_data_3des_cbc_rsa_oaep took 0.043 sec
   [junit] Caused an ERROR
   [junit] No Key Encryption Key loaded and cannot determine using key 
resolvers
   [junit] org.apache.xml.security.encryption.XMLEncryptionException: 
No Key Encryption Key loaded and cannot determine using key resolvers
   [junit] at 
org.apache.xml.security.encryption.XMLCipher.decryptToByteArray(Unknown 
Source)
   [junit] at 
org.apache.xml.security.test.encryption.BaltimoreEncTest.decryptData(Unknown 
Source)
   [junit] at 
org.apache.xml.security.test.encryption.BaltimoreEncTest.test_five_data_3des_cbc_rsa_oaep(Unknown 
Source)

Vishal


Re: XmlDsig error with base64Binary Type

2004-08-09 Thread Berin Lautenbach
Scott Cantor wrote:
It's probably worth documenting this better somewhere, though. People
stumble over this one a lot if they sign base64 data.
Good point.  I will do this.  (Or at least add to my ever growing list 
of things to do :<.)

Cheers,
Berin