Skip to Content.
Sympa Menu

mace-opensaml-users - Re: decoding public keys in metadata

Subject: OpenSAML user discussion

List archive

Re: decoding public keys in metadata


Chronological Thread 
  • From: Chad La Joie <>
  • To:
  • Subject: Re: decoding public keys in metadata
  • Date: Sun, 05 Aug 2007 11:53:33 -0400
  • Openpgp: id=A260F52E; url=http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0x3F5E9E87A260F52E
  • Organization: Georgetown University

Hey Paul,

You shouldn't be failing because of line breaks. Valid Base64
encoder/decoders should be able to handle string with or without lines
breaks.

KeyInfoHelper should be the class you use. Note that I did just commit
some code that should make cert/crl parsing a bit more robust, but that
shouldn't be effecting you. Can you post your code and the metadata?

One thing I wondered about, from what you said, is if you only have a
cert in the metadata and then you're calling getPublicKeys(KeyInfo).
That isn't going to work. getPublicKeys only returns those keys
represented as KeyValues elements. If this is what you're doing let me
know because I don't think it should be throwing an error, it should
just be returning null.

Paul Hethmon wrote:
> 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
>
>
>
>

--
Chad La Joie 2052-C Harris Bldg
OIS-Middleware 202.687.0124



Archive powered by MHonArc 2.6.16.

Top of Page