This function enables a transport application to query a security package for certain attributes of a security context.
At a Glance
Header file: | Sspi.h |
Windows CE versions: | 2.10 and later |
Syntax
SECURITY_STATUS QueryContextAttributes( PCtxtHandle phContext,
ULONG ulAttribute, PVOID pBuffer );
Parameters
phContext
Pointer to the handle to the context to be queried.
ulAttribute
Specifies the attribute of the context to be returned. It is one of the following values:
Value | Description |
SECPKG_ATTR_SIZES | Query the sizes of the structures used in the per-message functions. The pBuffer parameter is a pointer to a SecPkgContext_Sizes structure. |
SECPKG_ATTR_NAMES | Query the name associated with the context. The pBuffer parameter is a pointer to a SecPkgContext_Names structure. |
SECPKG_ATTR_LIFESPAN | Query the life span of the context. pBuffer is a pointer to a SecPkgContext_Lifespan structure. |
SECPKG_ATTR_DCE_INFO | Query for authorization data used by DCE services. pBuffer is a pointer to a SecPkgContext_DceInfo structure. |
SECPKG_ATTR_STREAM_SIZES | Query the sizes of the various stream components used in the per-message functions. The pBuffer parameter is a pointer to a SecPkgContext_StreamSizes structure. |
SECPKG_ATTR_AUTHORITY | Query the name of the authenticating authority. The pBuffer parameter is a pointer to a SecPkgContext_Authority structure. |
SECPKG_ATTR_KEY_INFO | Query information about the keys used in a security context. The pBuffer parameter is a pointer to a SecPkgContext_KeyInfo structure. |
pBuffer
Pointer to a structure that receives the attributes. The type of structure pointed to depends on the value specified in the ulAttribute parameter.
Return Values
SEC_E_OK indicates success. A nonzero error value indicates failure.
Remarks
The structure pointed to by the pBuffer parameter varies, depending on the attribute being queried. The caller must allocate the structure itself, but the package allocates other pointers that are returned in the structure. Any pointers allocated by the package can be freed by calling the FreeContextBuffer function.
See Also
FreeContextBuffer, SecPkgContext_DceInfo, SecPkgContext_Lifespan, SecPkgContext_Names, SecPkgContext_Sizes, SecPkgContext_StreamSizes