Export (0) Print
Expand All
Expand Minimize

ApplyControlToken function

The ApplyControlToken function provides a way to apply a control token to a security context. A token can be received when the security context is being established by a call to the InitializeSecurityContext (Schannel) function or with a per-message security service, such as verify or unseal.

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

This function is not supported in kernel mode.

This function allows additional or replacement tokens to be applied to a context.

Syntax


SECURITY_STATUS SEC_Entry ApplyControlToken(
  _In_  PCtxtHandle phContext,
  _In_  PSecBufferDesc pInput
);

Parameters

phContext [in]

A handle to the context to which the token is applied.

For information about the way the Schannel SSP notifies the remote party of the shutdown, see the Remarks section of DecryptMessage (Schannel). For additional information on the use of this function, see Shutting Down an Schannel Connection.

pInput [in]

A pointer to a SecBufferDesc structure that contains a pointer to a SecBuffer structure that contains the input token to apply to the context.

Return value

If the function succeeds, the function returns SEC_E_OK.

If the function fails, it returns a nonzero error code. The following error code is one of the possible error codes that can be returned.

Return codeDescription
SEC_E_UNSUPPORTED_FUNCTION

This value is returned by Schannel kernel mode to indicate that this function is not supported.

 

Remarks

The ApplyControlToken function can modify the context based on this token. Among the tokens that this function can add to the client context are SCHANNEL_ALERT_TOKEN and SCHANNEL_SESSION_TOKEN.

This function can be used to shut down the security context that underlies an existing Schannel connection. For information about how to do this, see Shutting Down an Schannel Connection.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Sspi.h (include Security.h)

Library

Secur32.lib

DLL

Secur32.dll

See also

SSPI Functions
ImpersonateSecurityContext
DecryptMessage (Schannel)
SCHANNEL_ALERT_TOKEN
SCHANNEL_SESSION_TOKEN
SecBuffer
SecBufferDesc

 

 

Community Additions

ADD
Show:
© 2014 Microsoft