diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-04 18:18:43 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-04 18:18:43 +0700 |
commit | 2d280660f30fe7653ebdc5d1e3d991e20c8bc92f (patch) | |
tree | f5e24398c52a45304e2d9d0ef7ceab492ab1d471 /crypto/src/tls/TlsClientProtocol.cs | |
parent | Fix test namespaces (diff) | |
download | BouncyCastle.NET-ed25519-2d280660f30fe7653ebdc5d1e3d991e20c8bc92f.tar.xz |
Fixes for new_session_ticket
- see https://github.com/bcgit/bc-csharp/issues/317
Diffstat (limited to 'crypto/src/tls/TlsClientProtocol.cs')
-rw-r--r-- | crypto/src/tls/TlsClientProtocol.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/crypto/src/tls/TlsClientProtocol.cs b/crypto/src/tls/TlsClientProtocol.cs index 4616580f0..c132b257b 100644 --- a/crypto/src/tls/TlsClientProtocol.cs +++ b/crypto/src/tls/TlsClientProtocol.cs @@ -708,7 +708,9 @@ namespace Org.BouncyCastle.Tls * RFC 5077 3.4. If the client receives a session ticket from the server, then it * discards any Session ID that was sent in the ServerHello. */ + securityParameters.m_sessionID = TlsUtilities.EmptyBytes; InvalidateSession(); + this.m_tlsSession = TlsUtilities.ImportSession(securityParameters.SessionID, null); ReceiveNewSessionTicket(buf); break; @@ -1001,13 +1003,8 @@ namespace Org.BouncyCastle.Tls TlsUtilities.Establish13PhaseSecrets(m_tlsClientContext, pskEarlySecret, sharedSecret); - { - InvalidateSession(); - - this.m_tlsSession = TlsUtilities.ImportSession(securityParameters.SessionID, null); - this.m_sessionParameters = null; - this.m_sessionMasterSecret = null; - } + InvalidateSession(); + this.m_tlsSession = TlsUtilities.ImportSession(securityParameters.SessionID, null); } /// <exception cref="IOException"/> @@ -1325,10 +1322,7 @@ namespace Org.BouncyCastle.Tls else { InvalidateSession(); - this.m_tlsSession = TlsUtilities.ImportSession(securityParameters.SessionID, null); - this.m_sessionParameters = null; - this.m_sessionMasterSecret = null; } } |