Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls
In directory sc8-pr-cvs1:/tmp/cvs-serv13804
Modified Files:
TlsCipherSuite.cs TlsSession.cs TlsSessionContext.cs
TlsSocket.cs
Log Message:
Added some improvements to the Handshake layer
Index: TlsCipherSuite.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsCipherSuite.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsCipherSuite.cs 11 Oct 2003 10:04:20 -0000 1.1
--- TlsCipherSuite.cs 13 Oct 2003 19:13:30 -0000 1.2
***************
*** 241,245 ****
cs.WriteByte((byte)paddingLength);
}
! cs.Close();
return ms.ToArray();
--- 241,246 ----
cs.WriteByte((byte)paddingLength);
}
! //cs.FlushFinalBlock();
! cs.Close();
return ms.ToArray();
Index: TlsSession.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsSession.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsSession.cs 11 Oct 2003 10:04:20 -0000 1.1
--- TlsSession.cs 13 Oct 2003 19:13:30 -0000 1.2
***************
*** 65,68 ****
--- 65,82 ----
}
+ public TlsNetworkStream NetworkStream
+ {
+ get { return networkStream; }
+ }
+
+ public TlsSessionState State
+ {
+ get { return state; }
+ }
+
+ #endregion
+
+ #region INTERNAL_PROPERTIES
+
internal TlsSessionContext Context
{
***************
*** 101,114 ****
{
get { return (short)Math.Pow(2, 14); }
- }
-
- public TlsNetworkStream NetworkStream
- {
- get { return networkStream; }
- }
-
- public TlsSessionState State
- {
- get { return state; }
}
--- 115,118 ----
Index: TlsSessionContext.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsSessionContext.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsSessionContext.cs 11 Oct 2003 10:04:20 -0000 1.1
--- TlsSessionContext.cs 13 Oct 2003 19:13:30 -0000 1.2
***************
*** 387,391 ****
serverWriteMAC = null;
! // Force the GC to recollect the memry ??
}
--- 387,391 ----
serverWriteMAC = null;
! // Force the GC to recollect the memory ??
}
Index: TlsSocket.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsSocket.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsSocket.cs 11 Oct 2003 10:04:20 -0000 1.1
--- TlsSocket.cs 13 Oct 2003 19:13:30 -0000 1.2
***************
*** 458,464 ****
private void processHandshakeMessage(TlsStreamReader handMsg)
{
! TlsHandshakeType handshakeType = (TlsHandshakeType)handMsg.ReadByte();
TlsHandshakeMessage message = null;
message = createServerHandshakeMessage(handshakeType, handMsg);
--- 458,474 ----
private void processHandshakeMessage(TlsStreamReader handMsg)
{
! TlsHandshakeType handshakeType = (TlsHandshakeType)handMsg.ReadByte();
TlsHandshakeMessage message = null;
+ // Read message length
+ int length = handMsg.ReadInt24();
+
+ // Read message data
+ /*
+ byte[] data = new byte[length];
+ handMsg.Read(data, 0, length);
+ */
+
+ // Create and process the server message
message = createServerHandshakeMessage(handshakeType, handMsg);
|