This topic has not yet been rated - Rate this topic

SetContextAttributes function

Applies to: desktop apps only

Enables a transport application to set attributes of a security context for a security package. This function is supported only by the Schannel security package.

Syntax

SECURITY_STATUS SEC_ENTRY SetContextAttributes(
  __in  PCtxtHandle phContext,
  __in  ULONG ulAttribute,
  __in  void *pBuffer,
  __in  ULONG cbBuffer
);

Parameters

phContext [in]

A handle to the security context to be set.

ulAttribute [in]

The attribute of the context to be set. This parameter can be one of the following values.

ValueMeaning
SECPKG_ATTR_APP_DATA

The pBuffer parameter contains a pointer to a SecPkgContext_SessionAppData structure.

Sets application data for the session.

This attribute is supported only by the Schannel security package.

SECPKG_ATTR_EAP_PRF_INFO

The pBuffer parameter contains a pointer to a SecPkgContext_EapPrfInfo structure.

Sets the pseudo-random function (PRF) used by the Extensible Authentication Protocol (EAP). This is the value that is returned by a call to the QueryContextAttributes (Schannel) function when SECPKG_ATTR_EAP_KEY_BLOCK is passed as the value of the ulAttribute parameter.

This attribute is supported only by the Schannel security package.

 

pBuffer [in]

A pointer to a structure that contains values to set the attributes to. The type of structure pointed to depends on the value specified in the ulAttribute parameter.

cbBuffer [in]

The size, in bytes, of the pBuffer parameter.

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.

Return codeDescription
SEC_E_UNSUPPORTED_FUNCTION

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

 

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Sspi.h (include Security.h)

Library

Secur32.lib

DLL

Secur32.dll

Unicode and ANSI names

SetContextAttributesW (Unicode) and SetContextAttributesA (ANSI)

 

 

Send comments about this topic to Microsoft

Build date: 3/13/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ