const DATA_BLOB in, TALLOC_CTX *mem_ctx,
DATA_BLOB *full_in)
{
- DATA_BLOB consume = data_blob_null;
struct spnego_state *spnego_state =
talloc_get_type_abort(gensec_security->private_data,
struct spnego_state);
return NT_STATUS_INVALID_PARAMETER;
}
- consume = in;
expected = spnego_state->in_needed - spnego_state->in_frag.length;
- if (consume.length > expected) {
- if (spnego_state->state_position != SPNEGO_SERVER_START) {
- /*
- * we got more than expected
- */
- return NT_STATUS_INVALID_PARAMETER;
- }
-
+ if (in.length > expected) {
/*
- * In SPNEGO_SERVER_START we need to ignore unexpected
- * bytes at the end.
+ * we got more than expected
*/
- consume.length = expected;
+ return NT_STATUS_INVALID_PARAMETER;
}
- if (consume.length == spnego_state->in_needed) {
+ if (in.length == spnego_state->in_needed) {
/*
- * if the consume.length contains the full blob
+ * if the in.length contains the full blob
* we are done.
*
* Note: this implies spnego_state->in_frag.length == 0,
* because we already know that we did not get
* more than expected.
*/
- *full_in = consume;
+ *full_in = in;
spnego_state->in_needed = 0;
return NT_STATUS_OK;
}
ok = data_blob_append(spnego_state, &spnego_state->in_frag,
- consume.data, consume.length);
+ in.data, in.length);
if (!ok) {
return NT_STATUS_NO_MEMORY;
}