SpQueryCredentialsAttributes function
The SpQueryCredentialsAttributes function retrieves the attributes for a credential.
The SpQueryCredentialsAttributes function is the dispatch function for the QueryCredentialsAttributes function of the Security Support Provider Interface.
Syntax
NTSTATUS SpQueryCredentialsAttributes( _In_ LSA_SEC_HANDLE CredentialHandle, _In_ ULONG CredentialAttribute, _Out_ PVOID Buffer );
Parameters
- CredentialHandle [in]
-
A handle to the credential to query.
- CredentialAttribute [in]
-
Attribute to query. The following table lists the valid values.
Value Meaning - SECPKG_CRED_ATTR_NAMES
The name of the principal associated with the credentials.
- SECPKG_ATTR_SUPPORTED_ALGS
The algorithms supported with a particular credential.
- SECPKG_ATTR_CIPHER_STRENGTHS
The minimum and maximum cipher strength used with a credential.
- SECPKG_ATTR_SUPPORTED_PROTOCOLS
The protocols supported with a particular credential.
- Buffer [out]
-
Pointer to a buffer that receives the requested attributes. Allocate memory for this buffer using the AllocateClientBuffer function, so that caller can free it by calling the FreeContextBuffer function.
Return value
If the function succeeds, return STATUS_SUCCESS.
If the function fails, return an NTSTATUS code that indicates the reason it failed. The following lists common reasons for failure and the error codes that the function should return.
| Return code | Description |
|---|---|
|
Memory allocation failed. |
|
The credential handle is not valid. |
Remarks
SSP/APs must implement the SpQueryCredentialsAttributes function; however, the actual name given to the implementation is up to the developer.
A pointer to the SpQueryCredentialsAttributes function is available in the SECPKG_FUNCTION_TABLE structure received from the SpLsaModeInitialize function.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
See also