Just send application data in channel bindings
authorLuke Howard <lukeh@padl.com>
Fri, 10 Sep 2010 17:13:23 +0000 (19:13 +0200)
committerLuke Howard <lukeh@padl.com>
Fri, 10 Sep 2010 17:13:23 +0000 (19:13 +0200)
mech_eap/accept_sec_context.c
mech_eap/init_sec_context.c
mech_eap/util_cksum.c

index 4efda99..180b734 100644 (file)
@@ -370,10 +370,15 @@ eapGssSmAcceptGssChannelBindings(OM_uint32 *minor,
     iov[0].buffer.length = 0;
     iov[0].buffer.value = NULL;
 
+#if 0
     major = gssEapEncodeGssChannelBindings(minor, chanBindings,
                                             &iov[0].buffer);
     if (GSS_ERROR(major))
         return major;
+#else
+    if (chanBindings != GSS_C_NO_CHANNEL_BINDINGS)
+        iov[0].buffer = chanBindings->application_data;
+#endif
 
     iov[1].type = GSS_IOV_BUFFER_TYPE_HEADER;
     iov[1].buffer.length = 16;
@@ -391,7 +396,9 @@ eapGssSmAcceptGssChannelBindings(OM_uint32 *minor,
         ctx->state = EAP_STATE_ESTABLISHED;
     }
 
+#if 0
     gss_release_buffer(&tmpMinor, &iov[0].buffer);
+#endif
 
     return major;
 }
index ca8492e..578f923 100644 (file)
@@ -452,12 +452,17 @@ eapGssSmInitGssChannelBindings(OM_uint32 *minor,
     iov[1].buffer.length = 0;
     iov[1].buffer.value = NULL;
 
+#if 0
     major = gssEapEncodeGssChannelBindings(minor, chanBindings,
                                             &iov[0].buffer);
     if (GSS_ERROR(major))
         goto cleanup;
 
     iov[0].type |= GSS_IOV_BUFFER_FLAG_ALLOCATED;
+#else
+    if (chanBindings != GSS_C_NO_CHANNEL_BINDINGS)
+        iov[0].buffer = chanBindings->application_data;
+#endif
 
     major = gssEapWrapOrGetMIC(minor, ctx, FALSE, FALSE, iov, 2,
                                TOK_TYPE_GSS_CB);
index 20813c5..62772fa 100644 (file)
@@ -170,6 +170,7 @@ gssEapVerify(krb5_context context,
                           sign_usage, iov, iov_count, 1, valid);
 }
 
+#if 0
 OM_uint32
 gssEapEncodeGssChannelBindings(OM_uint32 *minor,
                                gss_channel_bindings_t chanBindings,
@@ -212,3 +213,4 @@ gssEapEncodeGssChannelBindings(OM_uint32 *minor,
     *minor = 0;
     return GSS_S_COMPLETE;
 }
+#endif