Fixed Credential using a fixed-size 64-bit handle; it's always 2 pointers.

Reworked the Credential handle into a SafeCredentialHandle. We still use references to the raw handle, which is unsafe, but I will hopefully rework that soon.
This commit is contained in:
antiduh
2014-06-24 03:01:53 +00:00
parent 19f2e71e9c
commit fe14836949
7 changed files with 124 additions and 38 deletions

View File

@@ -31,7 +31,7 @@ namespace NSspi.Contexts
SetLastError = true
)]
public static extern SecurityStatus AcceptSecurityContext_1(
ref long credHandle,
ref RawSspiHandle credHandle,
IntPtr oldContextHandle,
IntPtr inputBuffer,
ContextAttrib requestedAttribs,
@@ -51,7 +51,7 @@ namespace NSspi.Contexts
SetLastError = true
)]
public static extern SecurityStatus AcceptSecurityContext_2(
ref long credHandle,
ref RawSspiHandle credHandle,
ref long oldContextHandle,
IntPtr inputBuffer,
ContextAttrib requestedAttribs,
@@ -104,7 +104,7 @@ namespace NSspi.Contexts
SetLastError = true
)]
public static extern SecurityStatus InitializeSecurityContext_1(
ref long credentialHandle,
ref RawSspiHandle credentialHandle,
IntPtr zero,
string serverPrincipleName,
ContextAttrib requiredAttribs,
@@ -126,7 +126,7 @@ namespace NSspi.Contexts
SetLastError = true
)]
public static extern SecurityStatus InitializeSecurityContext_2(
ref long credentialHandle,
ref RawSspiHandle credentialHandle,
ref long previousHandle,
string serverPrincipleName,
ContextAttrib requiredAttribs,