diff options
Diffstat (limited to 'crypto/src/tls/TlsProtocol.cs')
-rw-r--r-- | crypto/src/tls/TlsProtocol.cs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/crypto/src/tls/TlsProtocol.cs b/crypto/src/tls/TlsProtocol.cs index 8d0e3fc0d..8fe6dc225 100644 --- a/crypto/src/tls/TlsProtocol.cs +++ b/crypto/src/tls/TlsProtocol.cs @@ -450,7 +450,7 @@ namespace Org.BouncyCastle.Tls .SetServerExtensions(m_serverExtensions) .Build(); - this.m_tlsSession = TlsUtilities.ImportSession(m_tlsSession.SessionID, m_sessionParameters); + this.m_tlsSession = TlsUtilities.ImportSession(securityParameters.SessionID, m_sessionParameters); } else { @@ -590,8 +590,21 @@ namespace Org.BouncyCastle.Tls */ case HandshakeType.hello_request: case HandshakeType.key_update: + break; + + /* + * Not included in the transcript for (D)TLS 1.3+ + */ case HandshakeType.new_session_ticket: + { + ProtocolVersion negotiatedVersion = Context.ServerVersion; + if (null != negotiatedVersion && !TlsUtilities.IsTlsV13(negotiatedVersion)) + { + buf.UpdateHash(m_handshakeHash); + } + break; + } /* * These message types are deferred to the handler to explicitly update the transcript. @@ -956,8 +969,21 @@ namespace Org.BouncyCastle.Tls */ case HandshakeType.hello_request: case HandshakeType.key_update: + break; + + /* + * Not included in the transcript for (D)TLS 1.3+ + */ case HandshakeType.new_session_ticket: + { + ProtocolVersion negotiatedVersion = Context.ServerVersion; + if (null != negotiatedVersion && !TlsUtilities.IsTlsV13(negotiatedVersion)) + { + m_handshakeHash.Update(buf, off, len); + } + break; + } /* * These message types are deferred to the writer to explicitly update the transcript. |