X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=util_shib.cpp;h=a37329fe822e81ec203740112f838afd05e355e3;hb=15c93f06ee6ddefa7e7b095351f6e66698c7cc9e;hp=d0c1a79fb36fec543bbd24251be9357787713e6f;hpb=b47c10882ea3409098780eb9608d3008c91f076d;p=mech_eap.git diff --git a/util_shib.cpp b/util_shib.cpp index d0c1a79..a37329f 100644 --- a/util_shib.cpp +++ b/util_shib.cpp @@ -47,19 +47,18 @@ #include #include -#include #include +#include + #include "gssapiP_eap.h" using namespace shibsp; using namespace shibresolver; using namespace opensaml::saml2md; using namespace opensaml; -using namespace xmltooling::logging; using namespace xmltooling; -using namespace xercesc; using namespace std; gss_eap_shib_attr_provider::gss_eap_shib_attr_provider(void) @@ -158,14 +157,14 @@ gss_eap_shib_attr_provider::initFromGssContext(const gss_eap_attr_ctx *manager, return false; saml = static_cast - (manager->getProvider(ATTR_TYPE_SAML_ASSERTION)); + (m_manager->getProvider(ATTR_TYPE_SAML_ASSERTION)); radius = static_cast - (manager->getProvider(ATTR_TYPE_RADIUS)); + (m_manager->getProvider(ATTR_TYPE_RADIUS)); resolver = ShibbolethResolver::create(); if (gssCred != GSS_C_NO_CREDENTIAL && - gss_display_name(&minor, gssCred->name, &nameBuf, NULL) == GSS_S_COMPLETE) + gssEapDisplayName(&minor, gssCred->name, &nameBuf, NULL) == GSS_S_COMPLETE) resolver->setApplicationID((const char *)nameBuf.value); m_authenticated = false; @@ -190,14 +189,6 @@ gss_eap_shib_attr_provider::initFromGssContext(const gss_eap_attr_ctx *manager, delete resolver; -#ifdef GSSEAP_DEBUG - gss_buffer_desc testattr = { - sizeof("urn:greet:greeting") - 1, (void *)"urn:greet:greeting" }; - gss_buffer_desc testval = - { sizeof("Hello, GSS EAP.") - 1, (void *)"Hello, GSS EAP." }; - setAttribute(true, &testattr, &testval); -#endif /* GSSEAP_DEBUG */ - return true; } @@ -487,8 +478,11 @@ gss_eap_shib_attr_provider::duplicateAttributes(const vector src) OM_uint32 gssEapLocalAttrProviderInit(OM_uint32 *minor) { - return gss_eap_shib_attr_provider::init() - ? GSS_S_COMPLETE : GSS_S_FAILURE; + if (!gss_eap_shib_attr_provider::init()) { + *minor = GSSEAP_SHIB_INIT_FAILURE; + return GSS_S_FAILURE; + } + return GSS_S_COMPLETE; } OM_uint32