X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=mech_eap%2Futil_sm.c;h=036616811af60eca33a18ada2241f02ae679c610;hb=5b8d5fa196168dd14b6d52d87327edb4a54e9e03;hp=a12059dd6a2707602e3c5c4e990f6aec03db2581;hpb=c733bb860c7806bcae908bf4123f66c749d8da3c;p=moonshot.git diff --git a/mech_eap/util_sm.c b/mech_eap/util_sm.c index a12059d..0366168 100644 --- a/mech_eap/util_sm.c +++ b/mech_eap/util_sm.c @@ -45,6 +45,7 @@ ((status) == GSS_S_COMPLETE && (ctx)->state == GSSEAP_STATE_ESTABLISHED)); \ } while (0) +#ifdef GSSEAP_DEBUG static const char * gssEapStateToString(enum gss_eap_state state) { @@ -77,7 +78,6 @@ gssEapStateToString(enum gss_eap_state state) return s; } -#ifdef GSSEAP_DEBUG void gssEapSmTransition(gss_ctx_id_t ctx, enum gss_eap_state state) { @@ -89,7 +89,7 @@ gssEapSmTransition(gss_ctx_id_t ctx, enum gss_eap_state state) ctx->state = state; } -#endif +#endif /* GSSEAP_DEBUG */ static OM_uint32 makeErrorToken(OM_uint32 *minor, @@ -329,7 +329,7 @@ gssEapSmStep(OM_uint32 *minor, assert(innerOutputTokens->count <= smCount); - /* Check we understood all critical tokens */ + /* Check we understood all critical tokens sent by peer */ if (!GSS_ERROR(major)) { for (j = 0; j < innerInputTokens->count; j++) { if ((inputTokenTypes[j] & ITOK_FLAG_CRITICAL) && @@ -341,7 +341,7 @@ gssEapSmStep(OM_uint32 *minor, } } - /* Emit an error token if we are the acceptor */ + /* Optionaly emit an error token if we are the acceptor */ if (GSS_ERROR(major)) { if (CTX_IS_INITIATOR(ctx)) goto cleanup; /* return error directly to caller */ @@ -360,7 +360,7 @@ gssEapSmStep(OM_uint32 *minor, outputTokenTypes[0] = ITOK_TYPE_CONTEXT_ERR | ITOK_FLAG_CRITICAL; } - /* Format composite output token */ + /* Format output token from inner tokens */ if (innerOutputTokens->count != 0 || /* inner tokens to send */ !CTX_IS_INITIATOR(ctx) || /* any leg acceptor */ ctx->state != GSSEAP_STATE_ESTABLISHED) { /* non-last leg initiator */