diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-17 00:40:40 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-17 00:40:40 +0700 |
commit | ae8243b18d515b4942e41989b5d78fd05026ccd3 (patch) | |
tree | 5ee2bea0d14234e008b929d20751edde34716325 /crypto/src/tls/ClientHello.cs | |
parent | BiString updates from bc-java (diff) | |
download | BouncyCastle.NET-ed25519-ae8243b18d515b4942e41989b5d78fd05026ccd3.tar.xz |
TLS 1.3 PSK server-side work
Diffstat (limited to 'crypto/src/tls/ClientHello.cs')
-rw-r--r-- | crypto/src/tls/ClientHello.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/src/tls/ClientHello.cs b/crypto/src/tls/ClientHello.cs index 700d424cd..7f1018e89 100644 --- a/crypto/src/tls/ClientHello.cs +++ b/crypto/src/tls/ClientHello.cs @@ -70,6 +70,9 @@ namespace Org.BouncyCastle.Tls /// <exception cref="IOException"/> public void Encode(TlsContext context, Stream output) { + if (m_bindersSize < 0) + throw new TlsFatalAlert(AlertDescription.internal_error); + TlsUtilities.WriteVersion(m_version, output); output.Write(m_random, 0, m_random.Length); @@ -168,7 +171,7 @@ namespace Org.BouncyCastle.Tls extensions = TlsProtocol.ReadExtensionsDataClientHello(extBytes); } - return new ClientHello(clientVersion, random, sessionID, cookie, cipherSuites, extensions, 0); + return new ClientHello(clientVersion, random, sessionID, cookie, cipherSuites, extensions, -1); } } } |