SpAddCredentials function
Used to add credentials for a security principal.
Syntax
NTSTATUS SpAddCredentials( _In_ LSA_SEC_HANDLE CredentialHandle, _In_ PUNICODE_STRING PrincipalName, _In_ PUNICODE_STRING Package, _In_ ULONG CredentialUseFlags, _In_ PVOID AuthorizationData, _In_ PVOID GetKeyFunction, _In_ PVOID GetKeyArgument, _Out_ PTimeStamp ExpirationTime );
Parameters
- CredentialHandle [in]
-
A handle to the credential to add.
- PrincipalName [in]
-
Optional. Pointer to a UNICODE_STRING structure containing the name of the security principal whose credentials are being added.
- Package [in]
-
Pointer to a UNICODE_STRING structure containing the name of the authenticating package.
- CredentialUseFlags [in]
-
Flags indicating how the credentials will be used. The following values are valid.
Value Meaning - SECPKG_CRED_INBOUND
Credentials will be used with the AcceptSecurityContext (General) function.
- SECPKG_CRED_OUTBOUND
Credentials will be used with the InitializeSecurityContext (General) function.
- AuthorizationData [in]
-
Optional. Pointer to supplemental authentication data.
- GetKeyFunction [in]
-
Pointer to a function in the caller's address space that generates session keys.
- GetKeyArgument [in]
-
Pointer to the argument used with the GetKeyFunction function.
- ExpirationTime [out]
-
Pointer to a TimeStamp that receives the time the credentials handle expires.
Return value
If the function succeeds, return STATUS_SUCCESS.
If the function fails, return an NTSTATUS code that indicates the reason it failed.
Remarks
SSP/APs must implement the SpAddCredentials function; however, the actual name given to the implementation is up to the developer.
A pointer to the SpAddCredentials 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