sspicli: Implement SspiEncodeAuthIdentityAsStrings.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2016-07-13 10:28:32 +02:00 committed by Alexandre Julliard
parent 7f02dcbbca
commit 20ba0b08a9
2 changed files with 28 additions and 1 deletions

View File

@ -95,3 +95,30 @@ void SEC_ENTRY SspiZeroAuthIdentity( PSEC_WINNT_AUTH_IDENTITY_OPAQUE opaque_id )
if (id->Password) memset( id->Password, 0, id->PasswordLength * sizeof(WCHAR) ); if (id->Password) memset( id->Password, 0, id->PasswordLength * sizeof(WCHAR) );
memset( id, 0, sizeof(*id) ); memset( id, 0, sizeof(*id) );
} }
static inline WCHAR *strdupW( const WCHAR *src )
{
WCHAR *dst;
if (!src) return NULL;
if ((dst = HeapAlloc( GetProcessHeap(), 0, (strlenW( src ) + 1) * sizeof(WCHAR) )))
strcpyW( dst, src );
return dst;
}
/***********************************************************************
* SspiEncodeAuthIdentityAsStrings (SECUR32.0)
*/
SECURITY_STATUS SEC_ENTRY SspiEncodeAuthIdentityAsStrings(
PSEC_WINNT_AUTH_IDENTITY_OPAQUE opaque_id, PCWSTR *username,
PCWSTR *domainname, PCWSTR *creds )
{
SEC_WINNT_AUTH_IDENTITY_W *id = (SEC_WINNT_AUTH_IDENTITY_W *)opaque_id;
FIXME("%p %p %p %p\n", opaque_id, username, domainname, creds);
*username = strdupW( id->User );
*domainname = strdupW( id->Domain );
*creds = strdupW( id->Password );
return SEC_E_OK;
}

View File

@ -83,7 +83,7 @@
@ stub SspiCopyAuthIdentity @ stub SspiCopyAuthIdentity
@ stub SspiDecryptAuthIdentity @ stub SspiDecryptAuthIdentity
@ stub SspiDecryptAuthIdentityEx @ stub SspiDecryptAuthIdentityEx
@ stub SspiEncodeAuthIdentityAsStrings @ stdcall SspiEncodeAuthIdentityAsStrings(ptr ptr ptr ptr)
@ stdcall SspiEncodeStringsAsAuthIdentity(wstr wstr wstr ptr) @ stdcall SspiEncodeStringsAsAuthIdentity(wstr wstr wstr ptr)
@ stub SspiEncryptAuthIdentity @ stub SspiEncryptAuthIdentity
@ stub SspiEncryptAuthIdentityEx @ stub SspiEncryptAuthIdentityEx