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

◆ GetSniFromServerName()

static string System.Net.Security.TlsFrameHelper.GetSniFromServerName ( ReadOnlySpan< byte > serverName,
out bool invalid )
inlinestaticprivate

Definition at line 317 of file TlsFrameHelper.cs.

318 {
319 if (serverName.Length < 1)
320 {
321 invalid = true;
322 return null;
323 }
324 NameType nameType = (NameType)serverName[0];
325 ReadOnlySpan<byte> hostNameStruct = serverName.Slice(1);
326 if (nameType != 0)
327 {
328 invalid = true;
329 return null;
330 }
331 return GetSniFromHostNameStruct(hostNameStruct, out invalid);
332 }
static string GetSniFromHostNameStruct(ReadOnlySpan< byte > hostNameStruct, out bool invalid)
ReadOnlySpan< T > Slice(int start)

References System.Net.Security.TlsFrameHelper.GetSniFromHostNameStruct(), System.ReadOnlySpan< T >.Length, and System.ReadOnlySpan< T >.Slice().

Referenced by System.Net.Security.TlsFrameHelper.TryGetSniFromServerNameList().