summary refs log tree commit diff
path: root/crypto/src/tls/DtlsServerProtocol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/tls/DtlsServerProtocol.cs')
-rw-r--r--crypto/src/tls/DtlsServerProtocol.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/src/tls/DtlsServerProtocol.cs b/crypto/src/tls/DtlsServerProtocol.cs
index a3d04f01e..fcdc94cd6 100644
--- a/crypto/src/tls/DtlsServerProtocol.cs
+++ b/crypto/src/tls/DtlsServerProtocol.cs
@@ -740,11 +740,10 @@ namespace Org.BouncyCastle.Tls
             if (null == sessionVersion || !sessionVersion.IsDtls)
                 return false;
 
-            bool isEms = sessionParameters.IsExtendedMasterSecret;
-            if (!TlsUtilities.IsExtendedMasterSecretOptional(sessionVersion))
+            if (!sessionParameters.IsExtendedMasterSecret &&
+                !TlsUtilities.IsExtendedMasterSecretOptional(sessionVersion))
             {
-                if (!isEms)
-                    return false;
+                return false;
             }
 
             TlsCrypto crypto = state.serverContext.Crypto;