Creating a Credential from X509 string in C++

Gareth C garethenator at gmail.com
Tue Mar 19 01:13:20 EDT 2019


Hi all,

A bit of an unusual request, but I'm trying to validate SAML assertion
signatures in C++ using OpenSAML 3.0.0. Essentially, I'm trying to replicate
the last section of SAML2AssertionTest.h where the assertion is validated
using opensaml::SignatureProfileValidator and
xmlsignature::SignatureValidator. 

The one difference is that I want to create the credentials for the
SignatureValidator from a string containing an X509 public key (as opposed
to a file on disk). It seems like it should be simple enough, but I've been
having a lot of trouble figuring out how to construct a Credential object
from a string. The closest think I've found is the InlineCredential class
within InlineKeyResolver, but for some reason the compiler can't find
InlineCredential within the xmltooling namespace, which makes me think that
this is not how I'm supposed to use it. In Java there seems to be
CredentialSupport.getSimpleCredential to do this, but there doesn't seem to
be a direct equivalent in the C++ library. Can someone provide guidance
here?

Thanks!

P.S. This is not intended to be a full SP implementation. This is for a
service that audits assertion signatures as part of application logic, and
OpenSAML seems to be the only C++ library for SAML handling.



--
Sent from: http://shibboleth.1660669.n2.nabble.com/Shibboleth-Developers-f1660781.html


More information about the dev mailing list