Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake
In directory sc8-pr-cvs1:/tmp/cvs-serv13155
Modified Files:
TlsClientCertificateType.cs TlsClientFinished.cs
TlsClientHandshakeMessage.cs TlsServerFinished.cs
Log Message:
- Added some code reorganization.
- Started the work to implement Client Certificate and Client certificate verify handshake messages.
Index: TlsClientCertificateType.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientCertificateType.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsClientCertificateType.cs 1 Sep 2003 10:21:20 -0000 1.2
--- TlsClientCertificateType.cs 8 Oct 2003 12:17:20 -0000 1.3
***************
*** 21,25 ****
namespace System.Security.Tls.Handshake
{
! public enum TlsClientCertificateType
{
RSA = 1,
--- 21,25 ----
namespace System.Security.Tls.Handshake
{
! internal enum TlsClientCertificateType
{
RSA = 1,
Index: TlsClientFinished.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientFinished.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TlsClientFinished.cs 16 Sep 2003 12:29:08 -0000 1.4
--- TlsClientFinished.cs 8 Oct 2003 12:17:20 -0000 1.5
***************
*** 27,33 ****
public TlsClientFinished(TlsSession session)
! : base(session,
! TlsHandshakeType.Finished,
! TlsContentType.Handshake)
{
}
--- 27,31 ----
public TlsClientFinished(TlsSession session)
! : base(session, TlsHandshakeType.Finished, TlsContentType.Handshake)
{
}
***************
*** 51,56 ****
TlsStreamWriter hashes = new TlsStreamWriter();
! hashes.Write(Session.HandshakeHashes.GetMD5Hash());
! hashes.Write(Session.HandshakeHashes.GetSHAHash());
Write(Session.Context.PRF(Session.Context.MasterSecret, "client finished", hashes.GetBytes(), 12));
--- 49,54 ----
TlsStreamWriter hashes = new TlsStreamWriter();
! hashes.Write(Session.Context.HandshakeHashes.GetMD5Hash());
! hashes.Write(Session.Context.HandshakeHashes.GetSHAHash());
Write(Session.Context.PRF(Session.Context.MasterSecret, "client finished", hashes.GetBytes(), 12));
***************
*** 58,62 ****
hashes.Reset();
! Session.HandshakeHashes.Reset();
}
--- 56,60 ----
hashes.Reset();
! Session.Context.HandshakeHashes.Reset();
}
Index: TlsClientHandshakeMessage.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientHandshakeMessage.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TlsClientHandshakeMessage.cs 15 Sep 2003 10:24:17 -0000 1.4
--- TlsClientHandshakeMessage.cs 8 Oct 2003 12:17:20 -0000 1.5
***************
*** 80,84 ****
public virtual void UpdateSession()
{
! this.session.HandshakeHashes.Update(this.EncodeMessage());
this.Reset();
}
--- 80,84 ----
public virtual void UpdateSession()
{
! this.session.Context.HandshakeHashes.Update(this.EncodeMessage());
this.Reset();
}
Index: TlsServerFinished.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerFinished.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TlsServerFinished.cs 16 Sep 2003 12:29:08 -0000 1.6
--- TlsServerFinished.cs 8 Oct 2003 12:17:20 -0000 1.7
***************
*** 53,58 ****
TlsStreamWriter hashes = new TlsStreamWriter();
! hashes.Write(Session.HandshakeHashes.GetMD5Hash());
! hashes.Write(Session.HandshakeHashes.GetSHAHash());
byte[] clientPRF = Session.Context.PRF(Session.Context.MasterSecret, "server finished", hashes.GetBytes(), 12);
--- 53,58 ----
TlsStreamWriter hashes = new TlsStreamWriter();
! hashes.Write(Session.Context.HandshakeHashes.GetMD5Hash());
! hashes.Write(Session.Context.HandshakeHashes.GetSHAHash());
byte[] clientPRF = Session.Context.PRF(Session.Context.MasterSecret, "server finished", hashes.GetBytes(), 12);
***************
*** 73,77 ****
}
! Session.HandshakeHashes.Clear();
}
--- 73,77 ----
}
! Session.Context.HandshakeHashes.Clear();
}
|