From 7f02dcbbcaefada10d0eac166986b49e6d54d419 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Wed, 13 Jul 2016 10:28:31 +0200 Subject: [PATCH] sspicli: Implement SspiZeroAuthIdentity. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/sspicli/main.c | 16 ++++++++++++++++ dlls/sspicli/sspicli.spec | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/sspicli/main.c b/dlls/sspicli/main.c index a5313cb12fc..026ecfc5d56 100644 --- a/dlls/sspicli/main.c +++ b/dlls/sspicli/main.c @@ -79,3 +79,19 @@ SECURITY_STATUS SEC_ENTRY SspiEncodeStringsAsAuthIdentity( *opaque_id = id; return SEC_E_OK; } + +/*********************************************************************** + * SspiZeroAuthIdentity (SECUR32.0) + */ +void SEC_ENTRY SspiZeroAuthIdentity( PSEC_WINNT_AUTH_IDENTITY_OPAQUE opaque_id ) +{ + SEC_WINNT_AUTH_IDENTITY_W *id = (SEC_WINNT_AUTH_IDENTITY_W *)opaque_id; + + TRACE( "%p\n", opaque_id ); + + if (!id) return; + if (id->User) memset( id->User, 0, id->UserLength * sizeof(WCHAR) ); + if (id->Domain) memset( id->Domain, 0, id->DomainLength * sizeof(WCHAR) ); + if (id->Password) memset( id->Password, 0, id->PasswordLength * sizeof(WCHAR) ); + memset( id, 0, sizeof(*id) ); +} diff --git a/dlls/sspicli/sspicli.spec b/dlls/sspicli/sspicli.spec index 7b92102b796..2a78cff909c 100644 --- a/dlls/sspicli/sspicli.spec +++ b/dlls/sspicli/sspicli.spec @@ -99,6 +99,6 @@ @ stub SspiUnmarshalAuthIdentity @ stub SspiUnmarshalAuthIdentityInternal @ stub SspiValidateAuthIdentity -@ stub SspiZeroAuthIdentity +@ stdcall SspiZeroAuthIdentity(ptr) @ stub UnsealMessage @ stub VerifySignature