Hi there,

 

I'm using the XML-security package for a Java project.

 

I have this problem with as you describe it "vanishing attribute namespace prefixes". I tried the workaround (described in Mikolaj Habryn's message of Thu, 16 Sep 2004 19:05:56) but that didn't help me. I did the following:

 

   * I create message1 (document) and add a element with namespace.

   * I serialize it into message2 (documentToBeSigned) like this:

 

           OutputFormat format = new OutputFormat(document,"UTF-8",false);

           ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();

           XMLSerializer serializer = new XMLSerializer(arrayOutputStream,format);

           serializer.setNamespaces(true);

           serializer.asDOMSerializer();

           serializer.serialize(document.getDocumentElement());

Document documentToBeSigned = documentBuilder.parse(new ByteArrayInputStream(arrayOutputStream.toByteArray()));

 

   * I sign message2 and yes Mikolaj is right about the namespace being

     added and the signing succeeding, but there are namespaces and empty namespace (like this: xmlns="")

     attributes all over the place.

   * I "cut" the signature from message2

   * I import the message in message1 and all looks fine.

 

But when I try to verify message1 it fails. I think because I think the appearing xmlns="" 's in message2 are taken into account when signing the message (?? and message1 doesn't have them). Am I doing something wrong here?

 

Besides that I have a couple of questions:

1. Is it planned to be fixed in the coming month (for version 1.2)?

2. Is this problem logged as a bug and can I track it?

3. Is version 1.2 going to be compatible with jdk1.3 because when I yesterday tried to compile HEAD from CVS with       a 1.3 sdk I got several compiler errors on RuntimeExceptions that were passing the causing exceptions.

 

Thanks anyway,

 

Joris Wijlens

 

--

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Whitehorses B.V.

Dukatenburg 84a, Nieuwegein, +31 (0)30 - 600 4720

Malburgse Sluis 27, Arnhem, +31 (0)26 - 322 6900

Mobiel: +31 (0)6 - 5200 2532

 

 

Meer weten over nieuwe en interessante Oracle en Java ontwikkelingen?

Wat ze voor u betekenen en wat u er aan heeft?

Lees dan onze maandelijkse Whitebooks op www.whitehorses.nl.

Reply via email to