3.2.5.4 Sent SSPI Record with SPNEGO Packet State

If the response received from the server contains a structurally valid login response indicating a successful login, the TDS 4.2 client MUST indicate successful login completion to the upper layer and enter the Logged In state.

If the response received from the server contains a structurally valid SSPI response message, the TDS 4.2 client MUST send to the server an SSPI message (TDS 4.2 packet type %x11) containing the data obtained from the applicable SSPI layer.

If the response received from the server does not contain a structurally valid login response or SSPI response, or if it contains a structurally valid login response indicating login failure, the TDS 4.2 client MUST close the underlying transport connection, indicate an error to the upper layer, and enter the final state.