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

◆ CreateAlertFrame()

static byte[] System.Net.Security.TlsFrameHelper.CreateAlertFrame ( SslProtocols version,
TlsAlertDescription reason )
inlinestatic

Definition at line 166 of file TlsFrameHelper.cs.

167 {
168 if (reason == TlsAlertDescription.ProtocolVersion)
169 {
170 return CreateProtocolVersionAlert(version);
171 }
172 if (version > SslProtocols.Tls)
173 {
174 byte[] obj = new byte[7] { 21, 3, 3, 0, 2, 2, 0 };
175 obj[6] = (byte)reason;
176 byte[] array = obj;
177 switch (version)
178 {
179 case SslProtocols.Tls13:
180 array[2] = 4;
181 break;
182 case SslProtocols.Tls11:
183 array[2] = 2;
184 break;
185 case SslProtocols.Tls:
186 array[2] = 1;
187 break;
188 }
189 return array;
190 }
191 return Array.Empty<byte>();
192 }
static byte[] CreateProtocolVersionAlert(SslProtocols version)

References System.array, System.Net.Security.TlsFrameHelper.CreateProtocolVersionAlert(), and System.obj.

Referenced by System.Net.Security.SslStream.ForceAuthenticationAsync< TIOAdapter >().