summary refs log tree commit diff
path: root/crypto/src/tls/TlsClientProtocol.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-07-08 23:19:24 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-08 23:19:24 +0700
commit2d71de0765cbc92f064a29e03aab8ff88725deb4 (patch)
treed7ed01c72c460299c04d1cd3517ba676133dbd11 /crypto/src/tls/TlsClientProtocol.cs
parentRefactoring in DTLS (diff)
downloadBouncyCastle.NET-ed25519-2d71de0765cbc92f064a29e03aab8ff88725deb4.tar.xz
DTLS: refactoring around extended_master_secret
- especially the interaction with session resumption and the methods relating to use of EMS.
Diffstat (limited to '')
-rw-r--r--crypto/src/tls/TlsClientProtocol.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/src/tls/TlsClientProtocol.cs b/crypto/src/tls/TlsClientProtocol.cs
index b117a4025..30ad67fbe 100644
--- a/crypto/src/tls/TlsClientProtocol.cs
+++ b/crypto/src/tls/TlsClientProtocol.cs
@@ -1150,9 +1150,9 @@ namespace Org.BouncyCastle.Tls
              * Hello is always allowed.
              */
             this.m_serverExtensions = serverHelloExtensions;
-            if (m_serverExtensions != null)
+            if (serverHelloExtensions != null)
             {
-                foreach (int extType in m_serverExtensions.Keys)
+                foreach (int extType in serverHelloExtensions.Keys)
                 {
                     /*
                      * RFC 5746 3.6. Note that sending a "renegotiation_info" extension in response to a
@@ -1189,7 +1189,7 @@ namespace Org.BouncyCastle.Tls
                 }
             }
 
-            byte[] renegExtData = TlsUtilities.GetExtensionData(m_serverExtensions, ExtensionType.renegotiation_info);
+            byte[] renegExtData = TlsUtilities.GetExtensionData(serverHelloExtensions, ExtensionType.renegotiation_info);
 
             // NOT renegotiating
             {
@@ -1235,7 +1235,7 @@ namespace Org.BouncyCastle.Tls
 
                 if (TlsExtensionsUtilities.HasExtendedMasterSecretExtension(m_clientExtensions))
                 {
-                    negotiatedEms = TlsExtensionsUtilities.HasExtendedMasterSecretExtension(m_serverExtensions);
+                    negotiatedEms = TlsExtensionsUtilities.HasExtendedMasterSecretExtension(serverHelloExtensions);
 
                     if (TlsUtilities.IsExtendedMasterSecretOptional(server_version))
                     {
@@ -1272,11 +1272,11 @@ namespace Org.BouncyCastle.Tls
              * messages are considered.
              */
             securityParameters.m_applicationProtocol = TlsExtensionsUtilities.GetAlpnExtensionServer(
-                m_serverExtensions);
+                serverHelloExtensions);
             securityParameters.m_applicationProtocolSet = true;
 
             var sessionClientExtensions = m_clientExtensions;
-            var sessionServerExtensions = m_serverExtensions;
+            var sessionServerExtensions = serverHelloExtensions;
             if (securityParameters.IsResumedSession)
             {
                 if (securityParameters.CipherSuite != m_sessionParameters.CipherSuite