SetContextAttributes function
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.
Value Meaning - 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 code | Description |
|---|---|
|
This value is returned by Schannel kernel mode to indicate that this function is not supported. |
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | SetContextAttributesW (Unicode) and SetContextAttributesA (ANSI) |
Send comments about this topic to Microsoft
Build date: 1/2/2013