Skip to Content.
Sympa Menu

mace-opensaml-users - decoding public keys in metadata

Subject: OpenSAML user discussion

List archive

decoding public keys in metadata


Chronological Thread 
  • From: "Paul Hethmon" <>
  • To: <>
  • Subject: decoding public keys in metadata
  • Date: Fri, 3 Aug 2007 07:59:34 -0700

Assuming I have a valid metadata file with a public key as a <ds:X509Certificate>, what's the method for getting that into a usable Java object for validating signatures? I can dig down and get to it ok as XML objects, but when it comes to actually taking the BASE64 encoded value and coverting it to a PublicKey object, I can't seem to get it right. I'm pretty sure I'm failing in what I'm doing because of line breaks being lost in the conversion resulting in an invalid byte encoding. I get this using the KeyInfoHelper class as well as manipulating it on my own. In all cases,  I end up with an InvalidKeySpecException. Is there a helper class to handle the encoding in the XML metadata format?

 

thanks,

 

Paul

 

Paul Hethmon

www.clareitysecurity.com

cell: 865.250.3517

work: 865.769.0456

 




Archive powered by MHonArc 2.6.16.

Top of Page