You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by "Johan Vanbockryck (jvanbock)" <jv...@cisco.com> on 2004/01/08 15:16:04 UTC

[Java] EncryptedKey and URI in xenc:DataReference

Hi,

I'm unwrapping an EncryptedKey tag from an encrypted XML document. This
EncryptedKey contains a DataReference to the xenc:EncryptedData it
should be used for. When calling the XMLCipher.loadEncryptedKey, the URI
that is present on the xenc:DataReference is not present in the
EncryptedKey object that is returned however.

I did some debugging on the code and found that the
XMLCipher.newReferenceList function tries to get the URI as nodeValue
from the xenc:DataReference tag. Is this correct? Shouldn't it try to
obtain it from the URI attribute on the xenc:DataReference tag instead?


Regards,

Johan

Re: [Java] EncryptedKey and URI in xenc:DataReference

Posted by Berin Lautenbach <be...@wingsofhermes.org>.
Yup.  Just had a look at the code - looks very strange.

My reading is that it would be trying to convert "DataReference" to a 
URI, which would throw an exception which is then being discarded.

Do you have a short piece of XML I could play with?  I could dummy one 
up, although I am lazy.  (Although I can almost certainly promise I 
won't get a chance to play with it until next week - unless someone else 
on the list wants to have a look-see.)

Cheers,
	Berin

Johan Vanbockryck (jvanbock) wrote:

> Hi,
> 
> I'm unwrapping an EncryptedKey tag from an encrypted XML document. This
> EncryptedKey contains a DataReference to the xenc:EncryptedData it
> should be used for. When calling the XMLCipher.loadEncryptedKey, the URI
> that is present on the xenc:DataReference is not present in the
> EncryptedKey object that is returned however.
> 
> I did some debugging on the code and found that the
> XMLCipher.newReferenceList function tries to get the URI as nodeValue
> from the xenc:DataReference tag. Is this correct? Shouldn't it try to
> obtain it from the URI attribute on the xenc:DataReference tag instead?
> 
> 
> Regards,
> 
> Johan
> 
>