I can now successfully call InitializeSecurityContext and get a status of ContinueNeeded.

This commit is contained in:
antiduh
2014-06-21 16:32:34 +00:00
parent cc0235262c
commit c64765fbdf
11 changed files with 210 additions and 36 deletions

View File

@@ -1,4 +1,5 @@
using System;
using NSspi.Contexts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
@@ -11,6 +12,11 @@ namespace NSspi
{
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa374713(v=vs.85).aspx
// The REMSSPI sample:
// A C++ pure client/server example:
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa380536(v=vs.85).aspx
/*
SECURITY_STATUS sResult = AcquireCredentialsHandle(
NULL, // [in] name of principal. NULL = principal of current security context
@@ -166,18 +172,18 @@ namespace NSspi
CharSet = CharSet.Unicode,
SetLastError = true
)]
public static extern SecurityStatus InitializeSecurityContext_Client(
public static extern SecurityStatus InitializeSecurityContext_Client1(
ref long credentialHandle,
ref long prevContextHandle,
IntPtr zero,
string serverPrincipleName,
int requiredAttribs,
ContextAttrib requiredAttribs,
int reserved1,
int dataRep,
SecureBufferDataRep dataRep,
IntPtr inputBuffer,
int reserved2,
ref long newContextHandle,
IntPtr outputBuffer,
ref int contextAttribs,
ref ContextAttrib contextAttribs,
ref long expiry
);