move extracting raw assertion to RADIUS
authorLuke Howard <lukeh@padl.com>
Sun, 12 Sep 2010 14:23:46 +0000 (16:23 +0200)
committerLuke Howard <lukeh@padl.com>
Sun, 12 Sep 2010 14:23:46 +0000 (16:23 +0200)
get_name_attribute.c
util_saml.cpp
util_saml.h

index e12dffb..8eaf412 100644 (file)
@@ -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,
index 6256579..dcd7ae3 100644 (file)
@@ -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)
index 1115eb5..744618f 100644 (file)
@@ -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);