summary refs log tree commit diff
path: root/crypto/src/tls/TlsProtocol.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2024-04-12 23:11:20 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2024-04-12 23:11:20 +0700
commita50f679a981b253f36af5414285081f2c8bf9db3 (patch)
treefb98461cb32c2f72e19b7fde04d01244e4aad911 /crypto/src/tls/TlsProtocol.cs
parentTLS: Some work on GOST support (RFC 9189) (diff)
downloadBouncyCastle.NET-ed25519-a50f679a981b253f36af5414285081f2c8bf9db3.tar.xz
Refactoring in Tls
Diffstat (limited to '')
-rw-r--r--crypto/src/tls/TlsProtocol.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/crypto/src/tls/TlsProtocol.cs b/crypto/src/tls/TlsProtocol.cs
index 773412973..2ee5982cb 100644
--- a/crypto/src/tls/TlsProtocol.cs
+++ b/crypto/src/tls/TlsProtocol.cs
@@ -1458,15 +1458,9 @@ namespace Org.BouncyCastle.Tls
             if (null == sessionVersion || !sessionVersion.IsTls)
                 return false;
 
-            bool isEms = sessionParameters.IsExtendedMasterSecret;
-            if (sessionVersion.IsSsl)
+            if (!TlsUtilities.IsExtendedMasterSecretOptional(sessionVersion))
             {
-                if (isEms)
-                    return false;
-            }
-            else if (!TlsUtilities.IsExtendedMasterSecretOptional(sessionVersion))
-            {
-                if (!isEms)
+                if (sessionParameters.IsExtendedMasterSecret == sessionVersion.IsSsl)
                     return false;
             }