diff options
Diffstat (limited to 'crypto/src/tls/ServerNameList.cs')
-rw-r--r-- | crypto/src/tls/ServerNameList.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/tls/ServerNameList.cs b/crypto/src/tls/ServerNameList.cs index 358e82a67..248cf2f7f 100644 --- a/crypto/src/tls/ServerNameList.cs +++ b/crypto/src/tls/ServerNameList.cs @@ -43,10 +43,10 @@ namespace Org.BouncyCastle.Tls entry.Encode(buf); } - int length = (int)buf.Length; + int length = Convert.ToInt32(buf.Length); TlsUtilities.CheckUint16(length); TlsUtilities.WriteUint16(length, output); - Streams.WriteBufTo(buf, output); + buf.WriteTo(output); } /// <summary>Parse a <see cref="ServerNameList"/> from a <see cref="Stream"/>.</summary> |