Skip to Content.
Sympa Menu

mace-opensaml-users - RE: [OpenSAML]

Subject: OpenSAML user discussion

List archive

RE: [OpenSAML]


Chronological Thread 
  • From: Chris Card <>
  • To: <>
  • Subject: RE: [OpenSAML]
  • Date: Wed, 11 Aug 2010 15:18:38 +0000
  • Importance: Normal


> > If I've loaded a certificate using
> > SecurityHelper::loadCertificatesFromFile(), and got an XSECCryptoX509*,
> how
> > can I convert it into an xmlsignature::X509Certificate object?
>
> It's drastically easier to do this with the Credential interface because
> there's a built-in KeyInfo generation method there. You can literally just
> call getKeyInfo on that interface.

thanks, I'll take a look at that. Is there documentation on how to use the Credential interface?
For example, all the classes I can see derived from Credential have only protected constructors, so
do I have to derive my own class in order to create a Credential? I guess I must be missing something obvious here ...

>
> > I tried using SecurityHelper::getDEREncoding() on the XSECCryptoX509
> object,
> > and passing the result to xmlsignature::X509Certificate::setValue() but
> that
> > didn't give the result I was expecting:
>
> Look at the documentation in the header file (or the doxygen docs). That
> method gives you the DER of the public key, not the cert. I think there's a
> method on the object itself that may return the actual blob, from looking at
> the BasicX509Credential code. getDEREncodingSB I think.

I'd just come to same conclusion.

Chris



Archive powered by MHonArc 2.6.16.

Top of Page