2006-04-10 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Mon, 10 Apr 2006 15:06:27 +0000 (15:06 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Mon, 10 Apr 2006 15:06:27 +0000 (15:06 -0000)
* ClientSessionCache.cs: The session id can be zero-length (like our
own server class).
* SslServerStream.cs: Adapt code to fixes made in cipher suite and
message processing changes in client code.

svn path=/trunk/mcs/; revision=59303

mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientSessionCache.cs
mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs

index 40c0339e64758c43f402c7976eb43784ef93d75a..393110955a01bb271b138732fe952c1771d600ec 100644 (file)
@@ -1,3 +1,10 @@
+2006-04-10  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * ClientSessionCache.cs: The session id can be zero-length (like our 
+       own server class).
+       * SslServerStream.cs: Adapt code to fixes made in cipher suite and
+       message processing changes in client code.
+
 2006-03-16  Sebastien Pouliot  <sebastien@ximian.com>
  
        * CipherSuiteFactory.cs: Fix bad key exchange values for non-export
index cac365c911ff25d029dc8b1f18a2c5e37d9216fa..94201831f80c6be76389ad4bde00e9d2fb8a7782 100644 (file)
@@ -179,7 +179,7 @@ namespace Mono.Security.Protocol.Tls {
                                return null;
 
                        byte[] id = context.SessionId;
-                       if (id == null)
+                       if ((id == null) || (id.Length == 0))
                                return null;
 
                        // do we have a session cached for this host ?
index a97204b10fb5dae5fb014a827dc9d59df01d447a..47c5c0bdf264908f72d5dbd0e3e30c098a6c3877 100644 (file)
@@ -206,7 +206,7 @@ namespace Mono.Security.Protocol.Tls
                        this.protocol.SendRecord(HandshakeType.Certificate);
 
                        // If the negotiated cipher is a KeyEx cipher send ServerKeyExchange
-                       if (this.context.Cipher.ExchangeAlgorithmType == ExchangeAlgorithmType.RsaKeyX)
+                       if (this.context.Cipher.IsExportable)
                        {
                                this.protocol.SendRecord(HandshakeType.ServerKeyExchange);
                        }
@@ -215,7 +215,7 @@ namespace Mono.Security.Protocol.Tls
 
                        // If the negotiated cipher is a KeyEx cipher or
                        // the client certificate is required send the CertificateRequest message
-                       if (this.context.Cipher.ExchangeAlgorithmType == ExchangeAlgorithmType.RsaKeyX ||
+                       if (this.context.Cipher.IsExportable ||
                                ((ServerContext)this.context).ClientCertificateRequired)
                        {
                                this.protocol.SendRecord(HandshakeType.CertificateRequest);
@@ -254,10 +254,14 @@ namespace Mono.Security.Protocol.Tls
 
                        // Send ChangeCipherSpec and ServerFinished messages
                        this.protocol.SendChangeCipherSpec();
+                       this.protocol.SendRecord (HandshakeType.Finished);
 
                        // The handshake is finished
                        this.context.HandshakeState = HandshakeState.Finished;
 
+                       // Reset Handshake messages information
+                       this.context.HandshakeMessages.Reset ();
+
                        // Clear Key Info
                        this.context.ClearKeyInfo();
                }