[pgsqlclient-checkins] pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Sec
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2003-10-14 10:14:29
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client In directory sc8-pr-cvs1:/tmp/cvs-serv4172 Modified Files: TlsClientCertificate.cs TlsClientFinished.cs TlsServerFinished.cs TlsServerKeyExchange.cs Log Message: - TlsStreamReader and TlsStreamWriter classes are replaced by TlStream class. - Added license heaqder to TlsStream class. Index: TlsClientCertificate.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificate.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TlsClientCertificate.cs 13 Oct 2003 20:48:19 -0000 1.2 --- TlsClientCertificate.cs 14 Oct 2003 10:14:25 -0000 1.3 *************** *** 57,61 **** // Write client certificates information to a stream ! TlsStreamWriter stream = new TlsStreamWriter(); foreach (X509Certificate cert in Session.Settings.Certificates) { --- 57,61 ---- // Write client certificates information to a stream ! TlsStream stream = new TlsStream(); foreach (X509Certificate cert in Session.Settings.Certificates) { *************** *** 66,70 **** // Compose the message WriteInt24((int)stream.Length); ! Write(stream.GetBytes()); } --- 66,70 ---- // Compose the message WriteInt24((int)stream.Length); ! Write(stream.ToArray()); } Index: TlsClientFinished.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TlsClientFinished.cs 13 Oct 2003 20:48:19 -0000 1.2 --- TlsClientFinished.cs 14 Oct 2003 10:14:25 -0000 1.3 *************** *** 54,58 **** { // Get hashes of handshake messages ! TlsStreamWriter hashes = new TlsStreamWriter(); hashes.Write(Session.Context.HandshakeHashes.GetMD5Hash()); --- 54,58 ---- { // Get hashes of handshake messages ! TlsStream hashes = new TlsStream(); hashes.Write(Session.Context.HandshakeHashes.GetMD5Hash()); *************** *** 60,64 **** // Write message contents ! Write(Session.Context.PRF(Session.Context.MasterSecret, "client finished", hashes.GetBytes(), 12)); // Reset data --- 60,64 ---- // Write message contents ! Write(Session.Context.PRF(Session.Context.MasterSecret, "client finished", hashes.ToArray(), 12)); // Reset data Index: TlsServerFinished.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsServerFinished.cs 13 Oct 2003 20:48:19 -0000 1.3 --- TlsServerFinished.cs 14 Oct 2003 10:14:25 -0000 1.4 *************** *** 54,64 **** protected override void Parse() { ! byte[] serverPRF = ReadBytes((int)Length); ! 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); hashes.Reset(); --- 54,64 ---- protected override void Parse() { ! byte[] serverPRF = ReadBytes((int)Length); ! TlsStream hashes = new TlsStream(); hashes.Write(Session.Context.HandshakeHashes.GetMD5Hash()); hashes.Write(Session.Context.HandshakeHashes.GetSHAHash()); ! byte[] clientPRF = Session.Context.PRF(Session.Context.MasterSecret, "server finished", hashes.ToArray(), 12); hashes.Reset(); Index: TlsServerKeyExchange.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsServerKeyExchange.cs 13 Oct 2003 20:48:19 -0000 1.3 --- TlsServerKeyExchange.cs 14 Oct 2003 10:14:25 -0000 1.4 *************** *** 90,94 **** // Create server params array ! TlsStreamWriter stream = new TlsStreamWriter(); stream.Write(Session.Context.ClientRandom); --- 90,94 ---- // Create server params array ! TlsStream stream = new TlsStream(); stream.Write(Session.Context.ClientRandom); *************** *** 98,103 **** stream.Write(rsaParams.Exponent.Length); stream.Write(rsaParams.Exponent); ! byte[] serverParams = stream.GetBytes(); ! stream.Close(); // Compute md5 and sha hashes --- 98,103 ---- stream.Write(rsaParams.Exponent.Length); stream.Write(rsaParams.Exponent); ! byte[] serverParams = stream.ToArray(); ! stream.Reset(); // Compute md5 and sha hashes |