&negState, &return_token);
}
cleanup:
- if (return_token == INIT_TOKEN_SEND ||
- return_token == CONT_TOKEN_SEND) {
+ if (return_token != NO_TOKEN_SEND && return_token != CHECK_MIC) {
/* For acceptor-sends-first send a tokenInit */
int tmpret;
return_token,
output_token);
} else {
- tmpret = make_spnego_tokenTarg_msg(negState, sc->internal_mech,
+ tmpret = make_spnego_tokenTarg_msg(negState,
+ sc ? sc->internal_mech : GSS_C_NO_OID,
&mechtok_out, mic_out,
return_token,
output_token);
if (outbuf == GSS_C_NO_BUFFER)
return (GSS_S_DEFECTIVE_TOKEN);
+ if (sendtoken == INIT_TOKEN_SEND && mech_wanted == GSS_C_NO_OID)
+ return (GSS_S_DEFECTIVE_TOKEN);
outbuf->length = 0;
outbuf->value = NULL;