Working on some of the fundamentals of the Context side of things. The Win 32 API is very wonky here though. Going to take some time.
This commit is contained in:
43
Contexts/ClientContext.cs
Normal file
43
Contexts/ClientContext.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NSspi.Contexts
|
||||
{
|
||||
public class ClientContext : Context
|
||||
{
|
||||
public ClientContext( ClientCredential cred, string serverPrinc, ContextReqAttrib attribs )
|
||||
: base( cred )
|
||||
{
|
||||
long credHandle = base.Credential.CredentialHandle;
|
||||
|
||||
long prevContextHandle = 0;
|
||||
long newContextHandle = 0;
|
||||
|
||||
long expiry = 0;
|
||||
int newContextAttribs = 0;
|
||||
|
||||
SecurityStatus status;
|
||||
|
||||
|
||||
status = NativeMethods.InitializeSecurityContext_Client(
|
||||
ref credHandle,
|
||||
ref prevContextHandle,
|
||||
serverPrinc,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
IntPtr.Zero,
|
||||
0,
|
||||
ref newContextHandle,
|
||||
IntPtr.Zero,
|
||||
ref newContextAttribs,
|
||||
ref expiry
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user