cleanup
authorLuke Howard <lukeh@padl.com>
Fri, 17 Sep 2010 23:30:33 +0000 (01:30 +0200)
committerLuke Howard <lukeh@padl.com>
Fri, 17 Sep 2010 23:30:33 +0000 (01:30 +0200)
mech_eap/gssapiP_eap.h
mech_eap/util_attr.cpp
mech_eap/util_name.c
mech_eap/util_saml.h

index 1d97e73..31c4753 100644 (file)
@@ -62,8 +62,6 @@
 
 #define NAME_FLAG_NAI                       0x00000001
 #define NAME_FLAG_SERVICE                   0x00000002
-#define NAME_FLAG_RADIUS_ATTRIBUTES         0x00000004
-#define NAME_FLAG_SAML_ATTRIBUTES           0x00000008
 
 #define NAME_HAS_ATTRIBUTES(name)           ((name)->attrCtx != NULL)
 
index ebf0096..53ad003 100644 (file)
@@ -556,8 +556,12 @@ gssEapExportAttrContext(OM_uint32 *minor,
                         gss_name_t name,
                         gss_buffer_t buffer)
 {
-    if (name->attrCtx == NULL)
-        return GSS_S_UNAVAILABLE;
+    if (name->attrCtx == NULL) {
+        buffer->length = 0;
+        buffer->value = NULL;
+
+        return GSS_S_COMPLETE;
+    };
 
     try {
         name->attrCtx->marshall(buffer);
@@ -573,7 +577,8 @@ gssEapImportAttrContext(OM_uint32 *minor,
                         gss_buffer_t buffer,
                         gss_name_t name)
 {
-    GSSEAP_NOT_IMPLEMENTED;
+    if (buffer->length)
+        GSSEAP_NOT_IMPLEMENTED;
 }
 
 OM_uint32
index 29b0839..d0000b1 100644 (file)
@@ -287,10 +287,6 @@ importExportedName(OM_uint32 *minor,
         gss_buffer_desc buf;
 
         CHECK_REMAIN(4);
-        name->flags = load_uint32_be(p);
-        UPDATE_REMAIN(4);
-
-        CHECK_REMAIN(4);
         buf.length = load_uint32_be(p);
         UPDATE_REMAIN(4);
 
@@ -370,8 +366,6 @@ gssEapExportName(OM_uint32 *minor,
 
     exportedName->length = 6 + GSS_EAP_MECHANISM->length + 4 + krbNameLen;
     if (composite) {
-        exportedName->length += 4;
-
         major = gssEapExportAttrContext(minor, name, &attrs);
         if (GSS_ERROR(major))
             goto cleanup;
@@ -410,9 +404,6 @@ gssEapExportName(OM_uint32 *minor,
     p += krbNameLen;
 
     if (composite) {
-        store_uint32_be(name->flags, p);
-        p += 4;
-
         store_uint32_be(attrs.length, p);
         memcpy(&p[4], attrs.value, attrs.length);
         p += 4 + attrs.length;
index bbad54f..c380803 100644 (file)
@@ -95,14 +95,6 @@ public:
     gss_eap_saml_attr_provider(void) {}
     ~gss_eap_saml_attr_provider(void);
 
-#if 0
-    bool initFromExistingContext(const gss_eap_attr_ctx *source,
-                                 const gss_eap_attr_provider *ctx);
-    bool initFromGssContext(const gss_eap_attr_ctx *source,
-                            const gss_cred_id_t cred,
-                            const gss_ctx_id_t ctx);
-#endif
-
     bool getAttributeTypes(gss_eap_attr_enumeration_cb, void *data) const;
     void setAttribute(int complete,
                       const gss_buffer_t attr,