SpQueryCredentialsAttributesFn callback function (ntsecpkg.h)

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

SpQueryCredentialsAttributesFn Spquerycredentialsattributesfn;

NTSTATUS Spquerycredentialsattributesfn(
  [in]  LSA_SEC_HANDLE CredentialHandle,
  [in]  ULONG CredentialAttribute,
  [out] PVOID Buffer
)
{...}

Parameters

[in] CredentialHandle

A handle to the credential to query.

[in] CredentialAttribute

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.

[out] Buffer

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
SEC_E_INSUFFICIENT_MEMORY
Memory allocation failed.
SEC_E_INVALID_HANDLE
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

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header ntsecpkg.h

See also

SECPKG_FUNCTION_TABLE

SpLsaModeInitialize