Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Net.Security.TlsFrameHelper Class Reference

Classes

struct  TlsFrameInfo
 

Public Types

enum  ProcessingOptions { All = 0 , ServerName = 1 , ApplicationProtocol = 2 , Versions = 4 }
 
enum  ApplicationProtocolInfo { None = 0 , Http11 = 1 , Http2 = 2 , Other = 0x80 }
 

Public Member Functions

delegate bool HelloExtensionCallback (ref TlsFrameInfo info, ExtensionType type, ReadOnlySpan< byte > extensionsData)
 

Static Public Member Functions

static bool TryGetFrameHeader (ReadOnlySpan< byte > frame, ref TlsFrameHeader header)
 
static bool TryGetFrameInfo (ReadOnlySpan< byte > frame, ref TlsFrameInfo info, ProcessingOptions options=ProcessingOptions.All, HelloExtensionCallback callback=null)
 
static bool TryGetAlertInfo (ReadOnlySpan< byte > frame, ref TlsAlertLevel level, ref TlsAlertDescription description)
 
static byte[] CreateAlertFrame (SslProtocols version, TlsAlertDescription reason)
 

Private Types

enum  NameType : byte { HostName }
 

Static Private Member Functions

static byte[] CreateProtocolVersionAlert (SslProtocols version)
 
static bool TryParseHelloFrame (ReadOnlySpan< byte > sslHandshake, ref TlsFrameInfo info, ProcessingOptions options, HelloExtensionCallback callback)
 
static bool TryParseClientHello (ReadOnlySpan< byte > clientHello, ref TlsFrameInfo info, ProcessingOptions options, HelloExtensionCallback callback)
 
static bool TryParseServerHello (ReadOnlySpan< byte > serverHello, ref TlsFrameInfo info, ProcessingOptions options, HelloExtensionCallback callback)
 
static bool TryParseHelloExtensions (ReadOnlySpan< byte > extensions, ref TlsFrameInfo info, ProcessingOptions options, HelloExtensionCallback callback)
 
static bool TryGetSniFromServerNameList (ReadOnlySpan< byte > serverNameListExtension, out string sni)
 
static string GetSniFromServerName (ReadOnlySpan< byte > serverName, out bool invalid)
 
static string GetSniFromHostNameStruct (ReadOnlySpan< byte > hostNameStruct, out bool invalid)
 
static bool TryGetSupportedVersionsFromExtension (ReadOnlySpan< byte > extensionData, out SslProtocols protocols)
 
static bool TryGetApplicationProtocolsFromExtension (ReadOnlySpan< byte > extensionData, out ApplicationProtocolInfo alpn)
 
static SslProtocols TlsMinorVersionToProtocol (byte value)
 
static string DecodeString (ReadOnlySpan< byte > bytes)
 
static int ReadUInt24BigEndian (ReadOnlySpan< byte > bytes)
 
static ReadOnlySpan< byte > SkipBytes (ReadOnlySpan< byte > bytes, int numberOfBytesToSkip)
 
static ReadOnlySpan< byte > SkipOpaqueType1 (ReadOnlySpan< byte > bytes)
 
static ReadOnlySpan< byte > SkipOpaqueType2 (ReadOnlySpan< byte > bytes)
 

Static Private Attributes

static byte[] s_protocolMismatch13 = new byte[7] { 21, 3, 4, 0, 2, 2, 70 }
 
static byte[] s_protocolMismatch12 = new byte[7] { 21, 3, 3, 0, 2, 2, 70 }
 
static byte[] s_protocolMismatch11 = new byte[7] { 21, 3, 2, 0, 2, 2, 70 }
 
static byte[] s_protocolMismatch10 = new byte[7] { 21, 3, 1, 0, 2, 2, 70 }
 
static byte[] s_protocolMismatch30 = new byte[7] { 21, 3, 0, 0, 2, 2, 40 }
 
static readonly IdnMapping s_idnMapping
 
static readonly Encoding s_encoding = Encoding.GetEncoding("utf-8", new EncoderExceptionFallback(), new DecoderExceptionFallback())
 

Detailed Description

Definition at line 8 of file TlsFrameHelper.cs.


The documentation for this class was generated from the following file: