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

◆ ApplyAlertToken()

static SecurityStatusPal System.Net.Security.SslStreamPal.ApplyAlertToken ( ref SafeFreeCredentials credentialsHandle,
SafeDeleteContext securityContext,
TlsAlertType alertType,
TlsAlertMessage alertMessage )
inlinestatic

Definition at line 280 of file SslStreamPal.cs.

281 {
282 global::Interop.SChannel.SCHANNEL_ALERT_TOKEN sCHANNEL_ALERT_TOKEN = default(global::Interop.SChannel.SCHANNEL_ALERT_TOKEN);
283 sCHANNEL_ALERT_TOKEN.dwTokenType = 2u;
284 sCHANNEL_ALERT_TOKEN.dwAlertType = (uint)alertType;
285 sCHANNEL_ALERT_TOKEN.dwAlertNumber = (uint)alertMessage;
286 global::Interop.SChannel.SCHANNEL_ALERT_TOKEN reference = sCHANNEL_ALERT_TOKEN;
287 byte[] data = MemoryMarshal.AsBytes(MemoryMarshal.CreateReadOnlySpan(ref reference, 1)).ToArray();
288 SecurityBuffer inputBuffer = new SecurityBuffer(data, SecurityBufferType.SECBUFFER_TOKEN);
289 global::Interop.SECURITY_STATUS win32SecurityStatus = (global::Interop.SECURITY_STATUS)SSPIWrapper.ApplyControlToken(GlobalSSPI.SSPISecureChannel, ref securityContext, in inputBuffer);
290 return SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(win32SecurityStatus, attachException: true);
291 }

References System.Net.SSPIWrapper.ApplyControlToken(), System.Net.SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(), and System.Net.GlobalSSPI.SSPISecureChannel.

Referenced by System.Net.Security.SecureChannel.CreateFatalHandshakeAlertToken().