CompleteAuthToken function (sspi.h)

The CompleteAuthToken function completes an authentication token. This function is used by protocols, such as DCE, that need to revise the security information after the transport application has updated some message parameters.

This function is supported only by the Digest security support provider (SSP).

CompleteAuthToken is used on the server side only.

Syntax

SECURITY_STATUS SEC_ENTRY CompleteAuthToken(
  [in] PCtxtHandle    phContext,
  [in] PSecBufferDesc pToken
);

Parameters

[in] phContext

A handle of the context that needs to be completed.

[in] pToken

A pointer to a SecBufferDesc structure that contains the buffer descriptor for the entire message.

Return value

If the function succeeds, the function returns SEC_E_OK.

If the function fails, it returns one of the following error codes.

Return code Description
SEC_E_INVALID_HANDLE
The handle that was passed to the function is not valid.
SEC_E_INVALID_TOKEN
The token that was passed to the function is not valid.
SEC_E_OUT_OF_SEQUENCE
The client's security context was located, but the message number is incorrect. This return value is used with the Digest SSP.
SEC_E_MESSAGE_ALTERED
The client's security context was located, but the client's message has been tampered with. This return value is used with the Digest SSP.
SEC_E_INTERNAL_ERROR
An error occurred that did not map to an SSPI error code.

Remarks

The client of a transport application calls the CompleteAuthToken function to allow the security package to update a checksum or similar operation after all the protocol headers have been updated by the transport application. The client calls this function only if the InitializeSecurityContext (Digest) call returned SEC_I_COMPLETE_NEEDED or SEC_I_COMPLETE_AND_CONTINUE.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header sspi.h (include Security.h)
Library Secur32.lib
DLL Secur32.dll

See also

InitializeSecurityContext (Digest)

SSPI Functions

SecBufferDesc