X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=blobdiff_plain;f=mech_eap%2Futil_saml.cpp;h=71ad9bd742a4c6385397151cc346be52b983a7dd;hp=9a3862a5a9136507a0d67809e62bb68e1388d7df;hb=HEAD;hpb=166197f2e013dc309ca106c7750a7a66279342c0 diff --git a/mech_eap/util_saml.cpp b/mech_eap/util_saml.cpp index 9a3862a..71ad9bd 100644 --- a/mech_eap/util_saml.cpp +++ b/mech_eap/util_saml.cpp @@ -83,7 +83,7 @@ gss_eap_saml_assertion_provider::initWithExistingContext(const gss_eap_attr_ctx /* Then we may be creating from an existing attribute context */ const gss_eap_saml_assertion_provider *saml; - assert(m_assertion == NULL); + GSSEAP_ASSERT(m_assertion == NULL); if (!gss_eap_attr_provider::initWithExistingContext(manager, ctx)) return false; @@ -103,8 +103,9 @@ gss_eap_saml_assertion_provider::initWithGssContext(const gss_eap_attr_ctx *mana gss_buffer_desc value = GSS_C_EMPTY_BUFFER; int authenticated, complete; OM_uint32 minor; + gss_eap_attrid attrid(VENDORPEC_UKERNA, PW_SAML_AAA_ASSERTION); - assert(m_assertion == NULL); + GSSEAP_ASSERT(m_assertion == NULL); if (!gss_eap_attr_provider::initWithGssContext(manager, gssCred, gssCtx)) return false; @@ -115,9 +116,7 @@ gss_eap_saml_assertion_provider::initWithGssContext(const gss_eap_attr_ctx *mana radius = static_cast (m_manager->getProvider(ATTR_TYPE_RADIUS)); if (radius != NULL && - radius->getFragmentedAttribute(PW_SAML_AAA_ASSERTION, - VENDORPEC_UKERNA, - &authenticated, &complete, &value)) { + radius->getFragmentedAttribute(attrid, &authenticated, &complete, &value)) { setAssertion(&value, authenticated); gss_release_buffer(&minor, &value); } else { @@ -317,7 +316,7 @@ gss_eap_saml_assertion_provider::releaseAnyNameMapping(gss_buffer_t type_id GSSE const char * gss_eap_saml_assertion_provider::prefix(void) const { - return "urn:ietf:params:gss-eap:saml-aaa-assertion"; + return "urn:ietf:params:gss:federated-saml-assertion"; } bool @@ -414,7 +413,7 @@ gss_eap_saml_attr_provider::getAttributeTypes(gss_eap_attr_enumeration_cb addAtt * Each attribute carried in the assertion SHOULD also be a GSS name * attribute. The name of this attribute has three parts, all separated * by an ASCII space character. The first part is - * urn:ietf:params:gss-eap:saml-attr. The second part is the URI for + * urn:ietf:params:gss:federated-saml-attribute. The second part is the URI for * the SAML attribute name format. The final part is the name of the * SAML attribute. If the mechanism performs an additional attribute * query, the retrieved attributes SHOULD be GSS-API name attributes @@ -509,7 +508,7 @@ gss_eap_saml_attr_provider::setAttribute(int complete GSSEAP_UNUSED, attribute->getAttributeValues().push_back(attributeValue); - assert(attributeStatement != NULL); + GSSEAP_ASSERT(attributeStatement != NULL); attributeStatement->getAttributes().push_back(attribute); delete components; @@ -704,7 +703,7 @@ gss_eap_saml_attr_provider::getAttribute(const gss_buffer_t attr, } if (display_value != NULL && base64Encoded == false) { display_value->value = toUTF8(av->getTextContent(), true); - display_value->length = strlen((char *)value->value); + display_value->length = strlen((char *)display_value->value); } } @@ -730,7 +729,7 @@ gss_eap_saml_attr_provider::releaseAnyNameMapping(gss_buffer_t type_id GSSEAP_UN const char * gss_eap_saml_attr_provider::prefix(void) const { - return "urn:ietf:params:gss-eap:saml-attr"; + return "urn:ietf:params:gss:federated-saml-attribute"; } bool