You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by "Jose M. Selman" <js...@bee.cl> on 2004/11/03 22:38:16 UTC

Retriving Signature Value from enveloped signature

Hi:
	I'm using XML Signature 1.1 to create and append Signatures to XML
documents succesfully. I'm building an application that needs to validate
the signatures using a software called SophiaLite (apparently from
Verisign), so the methods boolean validate(...) from the API are not enough
for me :(. I'm extracting information as follows:

...
org.apache.xml.security.signature.SignedInfo si = signature.getSignedInfo();
String signed_text = new
String(si.getReferencedContentAfterTransformsItem(0).getBytes());
byte[] signature_octet = signature.getSignatureValue();     
...

After this piece of code the variable signed_text has the element that was
signed and signature_octet has the signature. However I need the signature
value in Base64 so I can use it for input to SophiaLite. Is there any way of
extracting this value using XML-Security's API without having to deal with
low level XML Api's? 

Cheers, 

Jose M. Selman