Validating certificates

2005-03-31 Thread Kenneth Jensen
Hey guys, I am working on an XKMS implementation, to some extent based on the org.apache.xml.security library. When validating X509 certificates, I need a smart way of resolving the certificate of the issuer of another certificate. If I get a certificate for validation, I can do one of these:

RE: Java XML C14n interop with .Net

2005-03-31 Thread Skip Walker
Hmm, well I'm still stuck. Using my test xml file, both Glue and .NET C# both produce all of these elements, while the javax.xml apis produce no entities. If I modify my test xml file to be entirely on one line, this eliminates the line feed problem, but it exposed another problem. My test

RE: Java XML C14n interop with .Net

2005-03-31 Thread Scott Cantor
> Using my test xml file, both Glue and .NET C# both produce all of these > elements, while the javax.xml apis produce no entities. Hmm. Reading the spec, it does say that text nodes get changed such that "all #xD characters are replaced by ". So, heh, you're right. Guess I never noticed, SAM

Re: Validating certificates

2005-03-31 Thread Vishal Mahajan
For validating certificates, instead of writing your own code for locating the issuer certificate try using the java.security.cert.CertPathBuilder API. It helps building the certificate path from the given certificate to its root CA. Vishal Kenneth Jensen wrote: Hey guys, I am working on an X

RE: Java XML C14n interop with .Net

2005-03-31 Thread Skip Walker
Okay, my apologies for the confusion. I know the canonicalization is not done by the XML parser. In my tests for both the Glue case, and what I was calling the javax.xml, I'm simply parsing my test file using the particular API to create the DOM, and then using the apache java xml security api t

RE: Java XML C14n interop with .Net

2005-03-31 Thread Scott Cantor
> For some reason, in my little test case, the canonicalizer renders a > different result with the DOM from the JAXP api then from the Glue api. > Apparently, the result from the JAXP DOM, produces something wrong, as far > as the soap:encodingStyle attribute goes. I guess a first sanity check wou

Re: Java XML C14n interop with .Net

2005-03-31 Thread Raul Benito
I'll think you are still having problems with your dom, but it is really weird as if your program is really what you have shown it should work, correctly. Anyway can you tell me what's the output of the following lines in your example: XMLSerializer ser=new XMLSerializer();

RE: Java XML C14n interop with .Net

2005-03-31 Thread Skip Walker
Outputting the dom via the serializer before running the canonicalizer, and comparing it with the output after the canonicalizer, it appears that the canonicalizer is having no effect. See below. I'm attaching my test class and test files. Would someone please check if they have similar results,

Re: Java XML C14n interop with .Net

2005-03-31 Thread Raul Benito
Ok, You have a bug in your code. You are using a parser non namespaceaware, you have this: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(false); factory.setNamespaceAware(true); Docum