Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AcceptSecurityContext()

static SecurityStatusPal System.Net.Security.SslStreamPal.AcceptSecurityContext ( ref SafeFreeCredentials credentialsHandle,
ref SafeDeleteSslContext context,
ReadOnlySpan< byte > inputBuffer,
ref byte[] outputBuffer,
SslAuthenticationOptions sslAuthenticationOptions )
inlinestatic

Definition at line 34 of file SslStreamPal.cs.

35 {
36 global::Interop.SspiCli.ContextFlags outFlags = global::Interop.SspiCli.ContextFlags.Zero;
37 InputSecurityBuffers inputBuffers = default(InputSecurityBuffers);
38 inputBuffers.SetNextBuffer(new InputSecurityBuffer(inputBuffer, SecurityBufferType.SECBUFFER_TOKEN));
39 inputBuffers.SetNextBuffer(new InputSecurityBuffer(default(ReadOnlySpan<byte>), SecurityBufferType.SECBUFFER_EMPTY));
40 if (sslAuthenticationOptions.ApplicationProtocols != null && sslAuthenticationOptions.ApplicationProtocols.Count != 0)
41 {
43 inputBuffers.SetNextBuffer(new InputSecurityBuffer(new ReadOnlySpan<byte>(array), SecurityBufferType.SECBUFFER_APPLICATION_PROTOCOLS));
44 }
45 SecurityBuffer outputBuffer2 = new SecurityBuffer(outputBuffer, SecurityBufferType.SECBUFFER_TOKEN);
46 int win32SecurityStatus = SSPIWrapper.AcceptSecurityContext(GlobalSSPI.SSPISecureChannel, credentialsHandle, ref context, global::Interop.SspiCli.ContextFlags.ReplayDetect | global::Interop.SspiCli.ContextFlags.SequenceDetect | global::Interop.SspiCli.ContextFlags.Confidentiality | global::Interop.SspiCli.ContextFlags.AllocateMemory | global::Interop.SspiCli.ContextFlags.AcceptExtendedError | global::Interop.SspiCli.ContextFlags.AcceptStream | (sslAuthenticationOptions.RemoteCertRequired ? global::Interop.SspiCli.ContextFlags.MutualAuth : global::Interop.SspiCli.ContextFlags.Zero), global::Interop.SspiCli.Endianness.SECURITY_NATIVE_DREP, inputBuffers, ref outputBuffer2, ref outFlags);
47 outputBuffer = outputBuffer2.token;
48 return SecurityStatusAdapterPal.GetSecurityStatusPalFromNativeInt(win32SecurityStatus);
49 }
static byte[] ConvertAlpnProtocolListToByteArray(List< SslApplicationProtocol > protocols)

References System.Net.SSPIWrapper.AcceptSecurityContext(), System.array, System.Net.Security.SslStreamPal.ConvertAlpnProtocolListToByteArray(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Net.SecurityStatusAdapterPal.GetSecurityStatusPalFromNativeInt(), and System.Net.GlobalSSPI.SSPISecureChannel.

Referenced by System.Net.Security.SecureChannel.GenerateToken(), and System.Net.Security.SslStreamPal.Renegotiate().