@@ -64,7 +64,7 @@ internal enum TlsAlertDescription : byte
6464 DecryptError = 51 , // error
6565 ExportRestriction = 60 , // reserved
6666 ProtocolVersion = 70 , // error
67- InsuffientSecurity = 71 , // error
67+ InsufficientSecurity = 71 , // error
6868 InternalError = 80 , // error
6969 UserCanceled = 90 , // warning or error
7070 NoRenegotiation = 100 , // warning
@@ -74,7 +74,7 @@ internal enum TlsAlertDescription : byte
7474 internal enum ExtensionType : ushort
7575 {
7676 ServerName = 0 ,
77- MaximumFagmentLength = 1 ,
77+ MaximumFragmentLength = 1 ,
7878 ClientCertificateUrl = 2 ,
7979 TrustedCaKeys = 3 ,
8080 TruncatedHmac = 4 ,
@@ -203,7 +203,7 @@ public static bool TryGetFrameHeader(ReadOnlySpan<byte> frame, ref TlsFrameHeade
203203 // max frame for SSLv2 is 32767.
204204 // However, we expect something reasonable for initial HELLO
205205 // We don't have enough logic to verify full validity,
206- // the limits bellow are queses .
206+ // the limits below are guesses .
207207#pragma warning disable CS0618 // Ssl2 and Ssl3 are obsolete
208208 header . Version = SslProtocols . Ssl2 ;
209209#pragma warning restore CS0618
@@ -220,7 +220,7 @@ public static bool TryGetFrameHeader(ReadOnlySpan<byte> frame, ref TlsFrameHeade
220220
221221 // This function will try to parse TLS hello frame and fill details in provided info structure.
222222 // If frame was fully processed without any error, function returns true.
223- // Otherwise it returns false and info may have partial data.
223+ // Otherwise, it returns false and info may have partial data.
224224 // It is OK to call it again if more data becomes available.
225225 // It is also possible to limit what information is processed.
226226 // If callback delegate is provided, it will be called on ALL extensions.
@@ -287,7 +287,7 @@ public static bool TryGetFrameInfo(ReadOnlySpan<byte> frame, ref TlsFrameInfo in
287287 return isComplete ;
288288 }
289289
290- // This is similar to TryGetFrameInfo but it will only process SNI.
290+ // This is similar to TryGetFrameInfo, but it will only process SNI.
291291 // It returns TargetName as string or NULL if SNI is missing or parsing error happened.
292292 public static string ? GetServerName ( ReadOnlySpan < byte > frame )
293293 {
@@ -300,7 +300,7 @@ public static bool TryGetFrameInfo(ReadOnlySpan<byte> frame, ref TlsFrameInfo in
300300 return info . TargetName ;
301301 }
302302
303- // This function will parse TLS Alert message and it will return alert level and description.
303+ // This function will parse the TLS Alert message, and return the alert level and description.
304304 public static bool TryGetAlertInfo ( ReadOnlySpan < byte > frame , ref TlsAlertLevel level , ref TlsAlertDescription description )
305305 {
306306 if ( frame . Length < 7 || frame [ 0 ] != ( byte ) TlsContentType . Alert )
@@ -465,12 +465,12 @@ private static bool TryParseServerHello(ReadOnlySpan<byte> serverHello, ref TlsF
465465 // }
466466 // ServerHello;
467467 const int CipherSuiteLength = 2 ;
468- const int CompressionMethiodLength = 1 ;
468+ const int CompressionMethodLength = 1 ;
469469
470470 ReadOnlySpan < byte > p = SkipBytes ( serverHello , ProtocolVersionSize + RandomSize ) ;
471471 // Skip SessionID (max size 32 => size fits in 1 byte)
472472 p = SkipOpaqueType1 ( p ) ;
473- p = SkipBytes ( p , CipherSuiteLength + CompressionMethiodLength ) ;
473+ p = SkipBytes ( p , CipherSuiteLength + CompressionMethodLength ) ;
474474
475475 // is invalid structure or no extensions?
476476 if ( p . IsEmpty )
@@ -674,7 +674,7 @@ private static bool TryGetSupportedVersionsFromExtension(ReadOnlySpan<byte> exte
674674 return false ;
675675 }
676676
677- // Get list of protocols we support.I nore the rest.
677+ // Get list of protocols we support. Ignore the rest.
678678 while ( extensionData . Length >= VersionLength )
679679 {
680680 if ( extensionData [ ProtocolVersionMajorOffset ] == ProtocolVersionTlsMajorValue )
0 commit comments