Skip to Content.
Sympa Menu

mace-opensaml-users - RE: [OpenSAML]

Subject: OpenSAML user discussion

List archive

RE: [OpenSAML]


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: <>
  • Subject: RE: [OpenSAML]
  • Date: Wed, 11 Aug 2010 10:59:47 -0400
  • Organization: The Ohio State University

> 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.

> 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.

-- Scott






Archive powered by MHonArc 2.6.16.

Top of Page