From: Luke Howard Date: Fri, 10 Sep 2010 17:13:23 +0000 (+0200) Subject: Just send application data in channel bindings X-Git-Url: http://www.project-moonshot.org/gitweb/?p=cyrus-sasl.git;a=commitdiff_plain;h=cc1b83827eb4a1057473ed8fcd381637b062f693 Just send application data in channel bindings --- diff --git a/mech_eap/accept_sec_context.c b/mech_eap/accept_sec_context.c index 4efda99..180b734 100644 --- a/mech_eap/accept_sec_context.c +++ b/mech_eap/accept_sec_context.c @@ -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; } diff --git a/mech_eap/init_sec_context.c b/mech_eap/init_sec_context.c index ca8492e..578f923 100644 --- a/mech_eap/init_sec_context.c +++ b/mech_eap/init_sec_context.c @@ -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); diff --git a/mech_eap/util_cksum.c b/mech_eap/util_cksum.c index 20813c5..62772fa 100644 --- a/mech_eap/util_cksum.c +++ b/mech_eap/util_cksum.c @@ -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