8[UnsupportedOSPlatform(
"tvos")]
47 Initialize(isServer, package, credential, spn, requestedContextFlags, channelBinding);
50 [MemberNotNull(
"_package")]
93 if (incomingBlob !=
null && incomingBlob.Length > 0)
106 string result =
null;
107 if (array2 !=
null && array2.Length != 0)
129 System.
Net.
NetEventSource.
Info(
this, $
"SSPIWrapper.InitializeSecurityContext() returns statusCode:0x{(int)statusCode.ErrorCode:x8} ({statusCode})",
"GetOutgoingBlob");
131 if (statusCode.ErrorCode ==
System.
Net.SecurityStatusPalErrorCode.CompleteNeeded)
136 System.
Net.
NetEventSource.
Info(
this, $
"SSPIWrapper.CompleteAuthToken() returns statusCode:0x{(int)statusCode.ErrorCode:x8} ({statusCode})",
"GetOutgoingBlob");
146 System.
Net.
NetEventSource.
Info(
this, $
"SSPIWrapper.AcceptSecurityContext() returns statusCode:0x{(int)statusCode.ErrorCode:x8} ({statusCode})",
"GetOutgoingBlob");
157 if (statusCode.ErrorCode >=
System.
Net.SecurityStatusPalErrorCode.OutOfMemory)
171 if (statusCode.ErrorCode ==
System.
Net.SecurityStatusPalErrorCode.OK || (
_isServer && statusCode.ErrorCode ==
System.
Net.SecurityStatusPalErrorCode.CompleteNeeded))
177 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 throwOnError, out System.Net.SecurityStatusPal statusCode)
System.Net.Security.SafeDeleteContext _securityContext
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 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 Win32Exception CreateExceptionFromError(System.Net.SecurityStatusPal statusCode)
static void CacheCredential(System.Net.Security.SafeFreeCredentials newHandle)