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: "Tom Scavo" <>
  • To:
  • Subject: Re: decoding public keys in metadata
  • Date: Fri, 3 Aug 2007 11:53:54 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AxLY9rUpvYCgNEaqMpO1spwKtXxMv7iOspE+qFOEPS6Ei0h5NaarJ7AJYjwF4DkgEz9TJ5X2xWkjGBslCf/Ec3K3YbE5rO9375alTtNNCZ9CajD/cKTgJc750Dnq2cX/I+dEtcQoqeBp2nszXMgnEh0A19hlMlXr8O4+zbC1VM0=

The Shibboleth open source project provides an example, I think. See
class XMLKeyDescriptor defined in public class XMLMetadataProvider:

http://svn.middleware.georgetown.edu/view/tags/Rel_1_3_FINAL_C/src/edu/internet2/middleware/shibboleth/metadata/provider/XMLMetadataProvider.java?root=java-idp&view=log

and its use in classes BasicTrust and ShibbolethTrust:

http://svn.middleware.georgetown.edu/view/tags/Rel_1_3_FINAL_C/src/edu/internet2/middleware/shibboleth/common/provider/BasicTrust.java?root=java-idp&view=log
http://svn.middleware.georgetown.edu/view/tags/Rel_1_3_FINAL_C/src/edu/internet2/middleware/shibboleth/common/provider/ShibbolethTrust.java?root=java-idp&view=log

Hope this helps,
Tom

On 8/3/07, 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
>
>



Archive powered by MHonArc 2.6.16.

Top of Page