8[UnsupportedOSPlatform(
"tvos")]
47 Initialize(isServer, package, credential, spn, requestedContextFlags, channelBinding);
50 [MemberNotNull(
"_package")]
103 if (incomingBlob !=
null && incomingBlob.Length > 0)
107 byte[] array2 =
null;
116 string result =
null;
117 if (array2 !=
null && array2.Length != 0)
145 System.
Net.
NetEventSource.
Info(
this, $
"SSPIWrapper.InitializeSecurityContext() returns statusCode:0x{(int)statusCode.ErrorCode:x8} ({statusCode})",
"GetOutgoingBlob");
147 if (statusCode.ErrorCode ==
System.
Net.SecurityStatusPalErrorCode.CompleteNeeded)
152 System.
Net.
NetEventSource.
Info(
this, $
"SSPIWrapper.CompleteAuthToken() returns statusCode:0x{(int)statusCode.ErrorCode:x8} ({statusCode})",
"GetOutgoingBlob");
162 System.
Net.
NetEventSource.
Info(
this, $
"SSPIWrapper.AcceptSecurityContext() returns statusCode:0x{(int)statusCode.ErrorCode:x8} ({statusCode})",
"GetOutgoingBlob");
173 if (statusCode.ErrorCode >=
System.
Net.SecurityStatusPalErrorCode.OutOfMemory)
187 if (statusCode.ErrorCode ==
System.
Net.SecurityStatusPalErrorCode.OK || (
_isServer && statusCode.ErrorCode ==
System.
Net.SecurityStatusPalErrorCode.CompleteNeeded))
193 System.
Net.
NetEventSource.
Info(
this, $
"need continue statusCode:0x{(int)statusCode.ErrorCode:x8} ({statusCode}) _securityContext:{_securityContext}",
"GetOutgoingBlob");
static string ToBase64String(byte[] inArray)
static unsafe byte[] FromBase64String(string s)
static ICredentials DefaultCredentials
void Initialize(bool isServer, string package, NetworkCredential credential, string spn, System.Net.ContextFlagsPal requestedContextFlags, ChannelBinding channelBinding)
string GetOutgoingBlob(string incomingBlob)
System.Net.ContextFlagsPal _contextFlags
NTAuthentication(bool isServer, string package, NetworkCredential credential, string spn, System.Net.ContextFlagsPal requestedContextFlags, ChannelBinding channelBinding)
ChannelBinding _channelBinding
System.Net.Security.SafeFreeCredentials _credentialsHandle
System.Net.ContextFlagsPal _requestedContextFlags
byte[] GetOutgoingBlob(byte[] incomingBlob, bool thrownOnError)
byte[] GetOutgoingBlob(byte[] incomingBlob, bool throwOnError, out System.Net.SecurityStatusPal statusCode)
System.Net.Security.SafeDeleteContext _securityContext
int MakeSignature(byte[] buffer, int offset, int count, [AllowNull] ref byte[] output)
int VerifySignature(byte[] buffer, int offset, int count)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static System.Net.SecurityStatusPal AcceptSecurityContext(System.Net.Security.SafeFreeCredentials credentialsHandle, ref System.Net.Security.SafeDeleteContext securityContext, System.Net.ContextFlagsPal requestedContextFlags, byte[] incomingBlob, ChannelBinding channelBinding, ref byte[] resultBlob, ref System.Net.ContextFlagsPal contextFlags)
static int VerifySignature(System.Net.Security.SafeDeleteContext securityContext, byte[] buffer, int offset, int count)
static System.Net.SecurityStatusPal InitializeSecurityContext(ref System.Net.Security.SafeFreeCredentials credentialsHandle, ref System.Net.Security.SafeDeleteContext securityContext, string spn, System.Net.ContextFlagsPal requestedContextFlags, byte[] incomingBlob, ChannelBinding channelBinding, ref byte[] resultBlob, ref System.Net.ContextFlagsPal contextFlags)
static System.Net.Security.SafeFreeCredentials AcquireDefaultCredential(string package, bool isServer)
static System.Net.SecurityStatusPal CompleteAuthToken(ref System.Net.Security.SafeDeleteContext securityContext, byte[] incomingBlob)
static System.Net.Security.SafeFreeCredentials AcquireCredentialsHandle(string package, bool isServer, NetworkCredential credential)
static int QueryMaxTokenSize(string package)
static int MakeSignature(System.Net.Security.SafeDeleteContext securityContext, byte[] buffer, int offset, int count, [AllowNull] ref byte[] output)
static Win32Exception CreateExceptionFromError(System.Net.SecurityStatusPal statusCode)
static void CacheCredential(System.Net.Security.SafeFreeCredentials newHandle)