From 1a186fb30f78cbe03e346bc3b23d81474bad1d4e Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sun, 12 Sep 2010 16:23:46 +0200 Subject: [PATCH] move extracting raw assertion to RADIUS --- mech_eap/get_name_attribute.c | 5 ++--- mech_eap/util_saml.cpp | 22 +--------------------- mech_eap/util_saml.h | 5 ----- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/mech_eap/get_name_attribute.c b/mech_eap/get_name_attribute.c index e12dffb..8eaf412 100644 --- a/mech_eap/get_name_attribute.c +++ b/mech_eap/get_name_attribute.c @@ -67,14 +67,13 @@ gss_get_name_attribute(OM_uint32 *minor, type = gssEapAttributePrefixToType(&prefix); switch (type) { - case ATTR_TYPE_SAML_AAA_ASSERTION: - major = samlGetAssertion(minor, name->samlCtx, value); - break; case ATTR_TYPE_SAML_ATTR: major = samlGetAttribute(minor, name->samlCtx, &suffix, authenticated, complete, value, display_value, more); break; + case ATTR_TYPE_SAML_AAA_ASSERTION: + break; case ATTR_TYPE_RADIUS_AVP: major = radiusGetAttribute(minor, name->radiusCtx, &suffix, authenticated, complete, diff --git a/mech_eap/util_saml.cpp b/mech_eap/util_saml.cpp index 6256579..dcd7ae3 100644 --- a/mech_eap/util_saml.cpp +++ b/mech_eap/util_saml.cpp @@ -201,10 +201,6 @@ samlDuplicateAttrContext(OM_uint32 *minor, if (GSS_ERROR(major)) goto cleanup; - major = duplicateBuffer(minor, (gss_buffer_t)&in->assertion, &ctx->assertion); - if (GSS_ERROR(major)) - goto cleanup; - ctx->resCtx = new DummyContext(in->resCtx->getResolvedAttributes()); cleanup: @@ -222,7 +218,6 @@ samlReleaseAttrContext(OM_uint32 *minor, if (ctx != NULL) { delete ctx->resCtx; - gss_release_buffer(minor, &ctx->assertion); GSSEAP_FREE(ctx); *pCtx = NULL; } @@ -278,11 +273,7 @@ samlCreateAttrContext(OM_uint32 *minor, if (GSS_ERROR(major)) goto cleanup; - major = duplicateBuffer(minor, buffer, &ctx->assertion); - if (GSS_ERROR(major)) - goto cleanup; - - major = samlImportAssertion(minor, &ctx->assertion, &assertion); + major = samlImportAssertion(minor, buffer, &assertion); if (GSS_ERROR(major)) goto cleanup; @@ -424,17 +415,6 @@ samlSetAttribute(OM_uint32 *minor, } OM_uint32 -samlGetAssertion(OM_uint32 *minor, - struct eap_gss_saml_attr_ctx *ctx, - gss_buffer_t buffer) -{ - if (ctx == NULL) - return GSS_S_UNAVAILABLE; - - return duplicateBuffer(minor, &ctx->assertion, buffer); -} - -OM_uint32 samlExportAttrContext(OM_uint32 *minor, struct eap_gss_saml_attr_ctx *ctx, gss_buffer_t buffer) diff --git a/mech_eap/util_saml.h b/mech_eap/util_saml.h index 1115eb5..744618f 100644 --- a/mech_eap/util_saml.h +++ b/mech_eap/util_saml.h @@ -79,11 +79,6 @@ samlSetAttribute(OM_uint32 *minor, gss_buffer_t value); OM_uint32 -samlGetAssertion(OM_uint32 *minor, - struct eap_gss_saml_attr_ctx *ctx, - gss_buffer_t buffer); - -OM_uint32 samlExportAttrContext(OM_uint32 *minor, struct eap_gss_saml_attr_ctx *ctx, gss_buffer_t buffer); -- 2.1.4