From 1cc412daaa874b80b79599bd71c53fc315bb9ac7 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 28 Jun 2023 16:29:22 +0700 Subject: Add TlsClient.ShouldUseCompatibilityMode --- crypto/src/tls/TlsClientProtocol.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/src/tls/TlsClientProtocol.cs') diff --git a/crypto/src/tls/TlsClientProtocol.cs b/crypto/src/tls/TlsClientProtocol.cs index 8e31fa6c8..99d088622 100644 --- a/crypto/src/tls/TlsClientProtocol.cs +++ b/crypto/src/tls/TlsClientProtocol.cs @@ -1694,7 +1694,7 @@ namespace Org.BouncyCastle.Tls * RFC 8446 4.2.1. In compatibility mode [..], this field MUST be non-empty, so a client * not offering a pre-TLS 1.3 session MUST generate a new 32-byte value. */ - if (legacy_session_id.Length < 1) + if (legacy_session_id.Length < 1 && TlsUtilities.ShouldUseCompatibilityMode(m_tlsClient)) { legacy_session_id = m_tlsClientContext.NonceGenerator.GenerateNonce(32); } -- cgit 1.4.1