pgsqlclient-checkins Mailing List for PostgreSqlClient (Page 38)
Status: Inactive
Brought to you by:
carlosga_fb
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(120) |
Aug
(95) |
Sep
(95) |
Oct
(213) |
Nov
(114) |
Dec
(64) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(6) |
Feb
(134) |
Mar
(88) |
Apr
(28) |
May
(22) |
Jun
(15) |
Jul
(23) |
Aug
(2) |
Sep
(15) |
Oct
(2) |
Nov
(6) |
Dec
|
2005 |
Jan
(8) |
Feb
(6) |
Mar
|
Apr
(42) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(84) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(84) |
Apr
(46) |
May
(40) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <car...@us...> - 2003-10-18 11:59:25
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv31334 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** changelog.txt 17 Oct 2003 20:48:58 -0000 1.45 --- changelog.txt 18 Oct 2003 11:59:16 -0000 1.46 *************** *** 2,7 **** ------------------------------------------------------- ! 2003-10-16 Carlos Guzmán Álvarez <car...@te...> --- 2,16 ---- ------------------------------------------------------- + 2003-10-18 Carlos Guzmán Álvarez <car...@te...> ! ! * Protocol implementation: ! ! - Added specific classes for handle PostgreSQL Geometric types ! ! - Added handling of line and lseg postgres types ! ! ! 2003-10-17 Carlos Guzmán Álvarez <car...@te...> |
From: <car...@us...> - 2003-10-18 01:16:39
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv32395 Added Files: PgDataType.cs Log Message: Added changes for better handling of postgres datatypes at protocol implementation layer --- NEW FILE: PgDataType.cs --- (This appears to be a binary file; contents omitted.) |
From: <car...@us...> - 2003-10-17 22:28:52
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1:/tmp/cvs-serv31959 Modified Files: PgCommandBuilder.cs PgDataReader.cs PgDbType.cs Log Message: Added changes for better handling of postgres datatypes at protocol implementation layer Index: PgCommandBuilder.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommandBuilder.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PgCommandBuilder.cs 16 Oct 2003 10:05:52 -0000 1.11 --- PgCommandBuilder.cs 17 Oct 2003 18:21:14 -0000 1.12 *************** *** 209,213 **** PgParameter parameter = command.Parameters.Add( "@ip" + i.ToString(), ! PgDbClient.Types[parameterTypes[i]].ProviderType); parameter.Direction = ParameterDirection.Input; --- 209,213 ---- PgParameter parameter = command.Parameters.Add( "@ip" + i.ToString(), ! (PgDbType)PgDbClient.Types[parameterTypes[i]].DataType); parameter.Direction = ParameterDirection.Input; Index: PgDataReader.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataReader.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PgDataReader.cs 9 Oct 2003 11:31:23 -0000 1.9 --- PgDataReader.cs 17 Oct 2003 18:21:14 -0000 1.10 *************** *** 625,629 **** private int getNumericPrecision(int i) { ! /* TODO : Add implementation */ return 0; } --- 625,629 ---- private int getNumericPrecision(int i) { ! #warning "Add implementation" return 0; } *************** *** 631,635 **** private int getNumericScale(int i) { ! /* TODO : Add implementation */ return 0; } --- 631,635 ---- private int getNumericScale(int i) { ! #warning "Add implementation" return 0; } *************** *** 642,646 **** private PgDbType getProviderType(int i) { ! return command.Statement.RowDescriptor.Fields[i].DataType.ProviderType; } --- 642,646 ---- private PgDbType getProviderType(int i) { ! return (PgDbType)command.Statement.RowDescriptor.Fields[i].DataType.DataType; } *************** *** 661,682 **** throw new IndexOutOfRangeException("Could not find specified column in results."); } - - bool returnValue = false; ! DbType fieldType = command.Statement.RowDescriptor.Fields[i].DataType.DbType; ! ! if (fieldType == DbType.Currency || ! fieldType == DbType.Int16 || ! fieldType == DbType.Int32 || ! fieldType == DbType.Int64 || ! fieldType == DbType.Single || ! fieldType == DbType.Double || ! fieldType == DbType.Decimal || ! fieldType == DbType.Byte) ! { ! returnValue = true; ! } ! ! return returnValue; } --- 661,666 ---- throw new IndexOutOfRangeException("Could not find specified column in results."); } ! return command.Statement.RowDescriptor.Fields[i].DataType.IsNumeric(); } *************** *** 688,701 **** } ! bool returnValue = false; ! ! DbType fieldType = command.Statement.RowDescriptor.Fields[i].DataType.DbType; ! ! if (fieldType == DbType.Binary) ! { ! returnValue = true; ! } ! ! return returnValue; } --- 672,676 ---- } ! return command.Statement.RowDescriptor.Fields[i].DataType.IsLong(); } Index: PgDbType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDbType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PgDbType.cs 17 Oct 2003 15:14:35 -0000 1.3 --- PgDbType.cs 17 Oct 2003 18:21:14 -0000 1.4 *************** *** 48,52 **** Time , TimeStamp , ! VarChar } } --- 48,53 ---- Time , TimeStamp , ! VarChar , ! Vector } } |
From: <car...@us...> - 2003-10-17 21:18:37
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv31277 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** changelog.txt 17 Oct 2003 18:56:24 -0000 1.44 --- changelog.txt 17 Oct 2003 20:48:58 -0000 1.45 *************** *** 11,15 **** at protocol implementation layer ! - Added support for read point values ( returned as double[2] ) --- 11,17 ---- at protocol implementation layer ! - Added support for read/write point values ( as double[2] ) ! ! - Added support for read/write circle values ( as double[3] ) |
From: <car...@us...> - 2003-10-17 20:54:56
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv31079 Modified Files: PgDbClient.cs PgOutputPacket.cs PgResponsePacket.cs Log Message: - Added support for read/write point values ( as double[2] ) - Added support for read/write circle values ( as double[3] ) Index: PgDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PgDbClient.cs 17 Oct 2003 18:23:02 -0000 1.22 --- PgDbClient.cs 17 Oct 2003 20:47:55 -0000 1.23 *************** *** 669,673 **** types.Add(604 , "polygon" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, -1); types.Add(628 , "line" , PgDataType.Line , Type.GetType("System.Array") , 701, 1, 32); ! types.Add(718 , "circle" , PgDataType.VarChar , Type.GetType("System.String") , 0, 1, 24); types.Add(700 , "float4" , PgDataType.Float , Type.GetType("System.Single") , 0, 1, 4); --- 669,673 ---- types.Add(604 , "polygon" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, -1); types.Add(628 , "line" , PgDataType.Line , Type.GetType("System.Array") , 701, 1, 32); ! types.Add(718 , "circle" , PgDataType.Circle , Type.GetType("System.Array") , 0, 1, 24); types.Add(700 , "float4" , PgDataType.Float , Type.GetType("System.Single") , 0, 1, 4); Index: PgOutputPacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgOutputPacket.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PgOutputPacket.cs 17 Oct 2003 18:55:01 -0000 1.9 --- PgOutputPacket.cs 17 Oct 2003 20:47:55 -0000 1.10 *************** *** 282,290 **** break; case PgDataType.Box: case PgDataType.Line: case PgDataType.LSeg: case PgDataType.Path: ! case PgDataType.Point: case PgDataType.Polygon: break; --- 282,307 ---- break; + case PgDataType.Point: + double[] point = (double[])value; + + packet.WriteInt(size); + packet.WriteDouble(point[0]); // x + packet.WriteDouble(point[1]); // y + break; + + case PgDataType.Circle: + double[] circle = (double[])value; + + packet.WriteInt(size); + packet.WriteDouble(circle[0]); // x + packet.WriteDouble(circle[1]); // y + packet.WriteDouble(circle[2]); // r + break; + case PgDataType.Box: case PgDataType.Line: case PgDataType.LSeg: case PgDataType.Path: ! case PgDataType.Polygon: break; Index: PgResponsePacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgResponsePacket.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PgResponsePacket.cs 17 Oct 2003 18:55:03 -0000 1.8 --- PgResponsePacket.cs 17 Oct 2003 20:47:55 -0000 1.9 *************** *** 291,294 **** --- 291,296 ---- } + // Geometric datatypes methods + public double[] ReadPoint() { *************** *** 296,300 **** double y = ReadDouble(); ! return new double[]{x,y}; } --- 298,311 ---- double y = ReadDouble(); ! return new double[]{x, y}; ! } ! ! public double[] ReadCircle() ! { ! double x = ReadDouble(); ! double y = ReadDouble(); ! double r = ReadDouble(); ! ! return new double[]{x, y, r}; } *************** *** 363,366 **** --- 374,380 ---- return ReadPoint(); + case PgDataType.Circle: + return ReadCircle(); + case PgDataType.Line: case PgDataType.LSeg: *************** *** 368,372 **** case PgDataType.Path: case PgDataType.Polygon: - case PgDataType.Circle: default: return ReadBytes(length); --- 382,385 ---- |
From: <car...@us...> - 2003-10-17 18:56:29
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv6995 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** changelog.txt 16 Oct 2003 14:26:50 -0000 1.43 --- changelog.txt 17 Oct 2003 18:56:24 -0000 1.44 *************** *** 5,8 **** --- 5,19 ---- 2003-10-16 Carlos Guzmán Álvarez <car...@te...> + + * Protocol implementation: + + - Added changes for better handling of postgres datatypes + at protocol implementation layer + + - Added support for read point values ( returned as double[2] ) + + + 2003-10-16 Carlos Guzmán Álvarez <car...@te...> + * TLS Library: |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv6711 Modified Files: PgOutputPacket.cs PgResponsePacket.cs PgType.cs PgTypeCollection.cs Log Message: - Added changes for better handling of postgres datatypes at protocol implementation layer - Added support for read point values ( returned as double[2] ) Index: PgOutputPacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgOutputPacket.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PgOutputPacket.cs 17 Oct 2003 18:23:02 -0000 1.8 --- PgOutputPacket.cs 17 Oct 2003 18:55:01 -0000 1.9 *************** *** 162,166 **** // Get array elements type info ! PgType elementType = PgDbClient.Types[parameter.DataType.ArrayType]; size = elementType.Size; --- 162,166 ---- // Get array elements type info ! PgType elementType = PgDbClient.Types[parameter.DataType.ElementType]; size = elementType.Size; *************** *** 175,179 **** // Write base type of the array elements ! packet.WriteInt(parameter.DataType.ArrayType); // Write lengths and lower bounds --- 175,179 ---- // Write base type of the array elements ! packet.WriteInt(parameter.DataType.ElementType); // Write lengths and lower bounds Index: PgResponsePacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgResponsePacket.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PgResponsePacket.cs 17 Oct 2003 18:23:02 -0000 1.7 --- PgResponsePacket.cs 17 Oct 2003 18:55:03 -0000 1.8 *************** *** 257,261 **** public Array ReadStringArray(PgType type, int length) { ! PgType elementType = PgDbClient.Types[type.ArrayType]; Array data = null; --- 257,261 ---- public Array ReadStringArray(PgType type, int length) { ! PgType elementType = PgDbClient.Types[type.ElementType]; Array data = null; *************** *** 277,281 **** public Array ReadVector(PgType type, int length) { ! PgType elementType = PgDbClient.Types[type.ArrayType]; Array data = null; --- 277,281 ---- public Array ReadVector(PgType type, int length) { ! PgType elementType = PgDbClient.Types[type.ElementType]; Array data = null; *************** *** 291,294 **** --- 291,302 ---- } + public double[] ReadPoint() + { + double x = ReadDouble(); + double y = ReadDouble(); + + return new double[]{x,y}; + } + public object ReadValue(PgType type, int length) { *************** *** 352,361 **** return ReadTimestamp(); - case PgDataType.Box: - case PgDataType.Path: case PgDataType.Point: ! case PgDataType.Polygon: case PgDataType.Line: case PgDataType.LSeg: default: return ReadBytes(length); --- 360,372 ---- return ReadTimestamp(); case PgDataType.Point: ! return ReadPoint(); ! case PgDataType.Line: case PgDataType.LSeg: + case PgDataType.Box: + case PgDataType.Path: + case PgDataType.Polygon: + case PgDataType.Circle: default: return ReadBytes(length); Index: PgType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PgType.cs 17 Oct 2003 18:23:02 -0000 1.4 --- PgType.cs 17 Oct 2003 18:55:04 -0000 1.5 *************** *** 30,34 **** private PgDataType dataType; private Type systemType; ! private int arrayType; private short formatCode; private int size; --- 30,34 ---- private PgDataType dataType; private Type systemType; ! private int elementType; private short formatCode; private int size; *************** *** 58,70 **** } ! public int ArrayType { get { ! int type = arrayType; while (PgDbClient.Types[type].DataType == PgDataType.Array) { ! type = PgDbClient.Types[type].Oid; } --- 58,70 ---- } ! public int ElementType { get { ! int type = elementType; while (PgDbClient.Types[type].DataType == PgDataType.Array) { ! type = PgDbClient.Types[type].ElementType; } *************** *** 87,96 **** #region CONSTRUCTORS ! public PgType(int oid, string name, PgDataType providerType, Type systemType, int arrayType, short formatCode, int size) { this.oid = oid; this.name = name; this.systemType = systemType; ! this.arrayType = arrayType; this.formatCode = formatCode; this.size = size; --- 87,97 ---- #region CONSTRUCTORS ! public PgType(int oid, string name, PgDataType dataType, Type systemType, int elementType, short formatCode, int size) { this.oid = oid; this.name = name; + this.dataType = dataType; this.systemType = systemType; ! this.elementType = elementType; this.formatCode = formatCode; this.size = size; Index: PgTypeCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgTypeCollection.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PgTypeCollection.cs 17 Oct 2003 18:23:02 -0000 1.4 --- PgTypeCollection.cs 17 Oct 2003 18:55:04 -0000 1.5 *************** *** 95,101 **** } ! public PgType Add(int oid, string name, PgDataType dataType, Type systemType, int arrayType, short formatCode, int size) { ! PgType type = new PgType(oid, name, dataType, systemType, arrayType, formatCode, size); base.Add(type); --- 95,101 ---- } ! public PgType Add(int oid, string name, PgDataType dataType, Type systemType, int elementType, short formatCode, int size) { ! PgType type = new PgType(oid, name, dataType, systemType, elementType, formatCode, size); base.Add(type); |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv32240 Modified Files: PgDbClient.cs PgOutputPacket.cs PgResponsePacket.cs PgType.cs PgTypeCollection.cs Log Message: Added changes for better handling of postgres datatypes at protocol implementation layer Index: PgDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** PgDbClient.cs 17 Oct 2003 15:14:05 -0000 1.21 --- PgDbClient.cs 17 Oct 2003 18:23:02 -0000 1.22 *************** *** 650,696 **** types = new PgTypeCollection(); ! types.Add(16 , "bool" , DbType.Boolean , Type.GetType("System.Boolean") , 0, 1, 1, false); ! types.Add(17 , "bytea" , DbType.Binary , Type.GetType("System.Array") , 0, 1, 0, false); ! types.Add(18 , "char" , DbType.StringFixedLength, Type.GetType("System.String"), 0, 0, 0, false); ! types.Add(19 , "name" , DbType.String , Type.GetType("System.String") , 0, 0, 0, false); ! types.Add(20 , "int8" , DbType.Int64 , Type.GetType("System.Int64") , 0, 1, 8, false); ! types.Add(21 , "int2" , DbType.Int16 , Type.GetType("System.Int16") , 0, 1, 2, false); ! types.Add(22 , "int2vector", DbType.Binary , Type.GetType("System.Array") , 21, 1, 2, true); ! types.Add(23 , "int4" , DbType.Int32 , Type.GetType("System.Int32") , 0, 1, 4, false); ! types.Add(24 , "regproc" , DbType.String , Type.GetType("System.String") , 0, 0, 0, false); ! types.Add(25 , "text" , DbType.String , Type.GetType("System.String") , 0, 0, 0, false); ! types.Add(26 , "oid" , DbType.Int32 , Type.GetType("System.Int32") , 0, 1, 4, false); ! types.Add(30 , "oidvector", DbType.Binary , Type.GetType("System.Array") , 26, 1, 4, true); ! types.Add(600 , "point" , DbType.Binary , Type.GetType("System.Array") , 701, 1, 16, false); ! types.Add(601 , "lseg" , DbType.Binary , Type.GetType("System.Array") , 600, 1, 32, false); ! types.Add(602 , "path" , DbType.String , Type.GetType("System.String") , 0, 0, -1, false); ! types.Add(603 , "box" , DbType.Binary , Type.GetType("System.Array") , 600, 1, 32, false); ! types.Add(604 , "polygon" , DbType.String , Type.GetType("System.String") , 0, 0, -1, false); ! types.Add(628 , "line" , DbType.Binary , Type.GetType("System.Array") , 701, 1, 32, false); ! types.Add(718 , "circle" , DbType.String , Type.GetType("System.String") , 0, 1, 24, false); ! types.Add(700 , "float4" , DbType.Single , Type.GetType("System.Single") , 0, 1, 4, false); ! types.Add(701 , "float8" , DbType.Double , Type.GetType("System.Double") , 0, 1, 8, false); ! // types.Add(705 , "unknown" , DbType.Object , Type.GetType("System.Object") , 0, 0, 0, false); ! types.Add(790 , "money" , DbType.Currency , Type.GetType("System.Decimal") , 0, 1, 4, false); ! types.Add(829 , "macaddr" , DbType.String , Type.GetType("System.String") , 0, 0, 6, false); ! types.Add(869 , "inet" , DbType.String , Type.GetType("System.String") , 0, 0, 0, false); ! types.Add(1005 , "_int2" , DbType.Binary , Type.GetType("System.Array") , 21, 1, 2, false); ! types.Add(1007 , "_int4" , DbType.Binary , Type.GetType("System.Array") , 23, 1, 4, false); ! types.Add(1016 , "_int8" , DbType.Binary , Type.GetType("System.Array") , 20, 1, 8, false); ! types.Add(1009 , "_text" , DbType.Binary , Type.GetType("System.Array") , 25, 1, 0, false); ! types.Add(1021 , "_float4" , DbType.Binary , Type.GetType("System.Array") , 700, 1, 4, false); ! types.Add(1033 , "aclitem" , DbType.String , Type.GetType("System.String") , 0, 0, 12, false); ! types.Add(1034 , "_aclitem", DbType.Binary , Type.GetType("System.Array") , 1033, 0, 0, false); ! types.Add(1042 , "bpchar" , DbType.String , Type.GetType("System.String") , 0, 0, 0, false); ! types.Add(1043 , "varchar" , DbType.String , Type.GetType("System.String") , 0, 0, 0, false); ! types.Add(1082 , "date" , DbType.Date , Type.GetType("System.DateTime") , 0, 1, 4, false); ! types.Add(1083 , "time" , DbType.Time , Type.GetType("System.DateTime") , 0, 1, 8, false); ! types.Add(1114 , "timestamp", DbType.DateTime , Type.GetType("System.DateTime") , 0, 1, 8, false); ! types.Add(1560 , "bit" , DbType.Byte , Type.GetType("System.Byte") , 0, 0, 1, false); ! types.Add(1562 , "varbit" , DbType.Byte , Type.GetType("System.Byte") , 0, 1, 0, false); ! types.Add(1700 , "numeric" , DbType.Decimal , Type.GetType("System.Decimal") , 0, 0, 8, false); ! types.Add(2277 , "anyarray", DbType.Binary , Type.GetType("System.Array") , 0, 1, 8, false); } --- 650,696 ---- types = new PgTypeCollection(); ! types.Add(16 , "bool" , PgDataType.Boolean , Type.GetType("System.Boolean") , 0, 1, 1); ! types.Add(17 , "bytea" , PgDataType.Binary , Type.GetType("System.Array") , 0, 1, 0); ! types.Add(18 , "char" , PgDataType.Char , Type.GetType("System.String") , 0, 0, 0); ! types.Add(19 , "name" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, 0); ! types.Add(20 , "int8" , PgDataType.Int8 , Type.GetType("System.Int64") , 0, 1, 8); ! types.Add(21 , "int2" , PgDataType.Int2 , Type.GetType("System.Int16") , 0, 1, 2); ! types.Add(22 , "int2vector", PgDataType.Vector , Type.GetType("System.Array") , 21, 1, 2); ! types.Add(23 , "int4" , PgDataType.Int4 , Type.GetType("System.Int32") , 0, 1, 4); ! types.Add(24 , "regproc" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, 0); ! types.Add(25 , "text" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, 0); ! types.Add(26 , "oid" , PgDataType.Int4 , Type.GetType("System.Int32") , 0, 1, 4); ! types.Add(30 , "oidvector", PgDataType.Vector , Type.GetType("System.Array") , 26, 1, 4); ! types.Add(600 , "point" , PgDataType.Point , Type.GetType("System.Array") , 701, 1, 16); ! types.Add(601 , "lseg" , PgDataType.LSeg , Type.GetType("System.Array") , 600, 1, 32); ! types.Add(602 , "path" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, -1); ! types.Add(603 , "box" , PgDataType.Box , Type.GetType("System.Array") , 600, 1, 32); ! types.Add(604 , "polygon" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, -1); ! types.Add(628 , "line" , PgDataType.Line , Type.GetType("System.Array") , 701, 1, 32); ! types.Add(718 , "circle" , PgDataType.VarChar , Type.GetType("System.String") , 0, 1, 24); ! types.Add(700 , "float4" , PgDataType.Float , Type.GetType("System.Single") , 0, 1, 4); ! types.Add(701 , "float8" , PgDataType.Double , Type.GetType("System.Double") , 0, 1, 8); ! // types.Add(705 , "unknown" , DbType.Object , Type.GetType("System.Object") , 0, 0, 0); ! types.Add(790 , "money" , PgDataType.Currency , Type.GetType("System.Decimal") , 0, 1, 4); ! types.Add(829 , "macaddr" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, 6); ! types.Add(869 , "inet" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, 0); ! types.Add(1005 , "_int2" , PgDataType.Binary , Type.GetType("System.Array") , 21, 1, 2); ! types.Add(1007 , "_int4" , PgDataType.Binary , Type.GetType("System.Array") , 23, 1, 4); ! types.Add(1016 , "_int8" , PgDataType.Binary , Type.GetType("System.Array") , 20, 1, 8); ! types.Add(1009 , "_text" , PgDataType.Binary , Type.GetType("System.Array") , 25, 1, 0); ! types.Add(1021 , "_float4" , PgDataType.Binary , Type.GetType("System.Array") , 700, 1, 4); ! types.Add(1033 , "aclitem" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, 12); ! types.Add(1034 , "_aclitem", PgDataType.Binary , Type.GetType("System.Array") , 1033, 0, 0); ! types.Add(1042 , "bpchar" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, 0); ! types.Add(1043 , "varchar" , PgDataType.VarChar , Type.GetType("System.String") , 0, 0, 0); ! types.Add(1082 , "date" , PgDataType.Date , Type.GetType("System.DateTime") , 0, 1, 4); ! types.Add(1083 , "time" , PgDataType.Time , Type.GetType("System.DateTime") , 0, 1, 8); ! types.Add(1114 , "timestamp", PgDataType.TimeStamp , Type.GetType("System.DateTime") , 0, 1, 8); ! types.Add(1560 , "bit" , PgDataType.Byte , Type.GetType("System.Byte") , 0, 0, 1); ! types.Add(1562 , "varbit" , PgDataType.Byte , Type.GetType("System.Byte") , 0, 1, 0); ! types.Add(1700 , "numeric" , PgDataType.Decimal , Type.GetType("System.Decimal") , 0, 0, 8); ! types.Add(2277 , "anyarray", PgDataType.Binary , Type.GetType("System.Array") , 0, 1, 8); } Index: PgOutputPacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgOutputPacket.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PgOutputPacket.cs 7 Oct 2003 09:06:15 -0000 1.7 --- PgOutputPacket.cs 17 Oct 2003 18:23:02 -0000 1.8 *************** *** 154,159 **** else { ! if (parameter.DataType.DbType == DbType.Binary && ! parameter.DataType.ArrayType != 0) { // Handle this type as Array values --- 154,160 ---- else { ! if (parameter.DataType.DataType == PgDataType.Binary || ! parameter.DataType.DataType == PgDataType.Array || ! parameter.DataType.DataType == PgDataType.Vector) { // Handle this type as Array values *************** *** 186,190 **** foreach (object element in array) { ! this.writeParameter(packet, elementType.DbType, size, element); } --- 187,191 ---- foreach (object element in array) { ! this.writeParameter(packet, elementType.DataType, size, element); } *************** *** 196,200 **** else { ! writeParameter(this, parameter.DataType.DbType, size, parameter.Value); } } --- 197,201 ---- else { ! writeParameter(this, parameter.DataType.DataType, size, parameter.Value); } } *************** *** 205,238 **** #region PRIVATE_METHODS ! private void writeParameter(PgOutputPacket packet, DbType dbType, int size, object value) { ! switch (dbType) { ! case DbType.Binary: packet.WriteInt(((byte[])value).Length); packet.Write((byte[])value); break; ! case DbType.Byte: packet.WriteInt(size); packet.Write((byte)value); break; ! case DbType.Int16: packet.WriteInt(size); packet.WriteShort(Convert.ToInt16(value)); break; ! case DbType.Int32: packet.WriteInt(size); packet.WriteInt(Convert.ToInt32(value)); break; ! case DbType.Int64: packet.WriteInt(size); packet.WriteLong(Convert.ToInt64(value)); break; ! case DbType.Decimal: { string paramValue = value.ToString(); --- 206,239 ---- #region PRIVATE_METHODS ! private void writeParameter(PgOutputPacket packet, PgDataType dataType, int size, object value) { ! switch (dataType) { ! case PgDataType.Binary: packet.WriteInt(((byte[])value).Length); packet.Write((byte[])value); break; ! case PgDataType.Byte: packet.WriteInt(size); packet.Write((byte)value); break; ! case PgDataType.Int2: packet.WriteInt(size); packet.WriteShort(Convert.ToInt16(value)); break; ! case PgDataType.Int4: packet.WriteInt(size); packet.WriteInt(Convert.ToInt32(value)); break; ! case PgDataType.Int8: packet.WriteInt(size); packet.WriteLong(Convert.ToInt64(value)); break; ! case PgDataType.Decimal: { string paramValue = value.ToString(); *************** *** 242,277 **** break; ! case DbType.Double: packet.WriteInt(size); packet.WriteDouble(Convert.ToDouble(value)); break; ! case DbType.Single: packet.WriteInt(size); packet.WriteFloat(Convert.ToSingle(value)); break; ! case DbType.Currency: packet.WriteInt(size); packet.WriteInt(Convert.ToInt32(Convert.ToSingle(value)*100)); break; ! case DbType.Date: packet.WriteInt(size); packet.WriteDate((DateTime)value); break; ! case DbType.DateTime: packet.WriteInt(size); ! packet.WriteTimestamp((DateTime)value); break; ! case DbType.Time: packet.WriteInt(size); ! packet.WriteTime((DateTime)value); break; ! case DbType.String: ! case DbType.StringFixedLength: { string paramValue = value.ToString(); --- 243,278 ---- break; ! case PgDataType.Double: packet.WriteInt(size); packet.WriteDouble(Convert.ToDouble(value)); break; ! case PgDataType.Float: packet.WriteInt(size); packet.WriteFloat(Convert.ToSingle(value)); break; ! case PgDataType.Currency: packet.WriteInt(size); packet.WriteInt(Convert.ToInt32(Convert.ToSingle(value)*100)); break; ! case PgDataType.Date: packet.WriteInt(size); packet.WriteDate((DateTime)value); break; ! case PgDataType.Time: packet.WriteInt(size); ! packet.WriteTime((DateTime)value); break; ! case PgDataType.TimeStamp: packet.WriteInt(size); ! packet.WriteTimestamp((DateTime)value); break; ! case PgDataType.Char: ! case PgDataType.VarChar: { string paramValue = value.ToString(); *************** *** 280,283 **** --- 281,292 ---- } break; + + case PgDataType.Box: + case PgDataType.Line: + case PgDataType.LSeg: + case PgDataType.Path: + case PgDataType.Point: + case PgDataType.Polygon: + break; } } Index: PgResponsePacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgResponsePacket.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgResponsePacket.cs 29 Sep 2003 14:33:01 -0000 1.6 --- PgResponsePacket.cs 17 Oct 2003 18:23:02 -0000 1.7 *************** *** 171,175 **** } ! public float ReadMoney() { float val = (float)ReadInt(); --- 171,175 ---- } ! public float ReadCurrency() { float val = (float)ReadInt(); *************** *** 293,364 **** public object ReadValue(PgType type, int length) { ! switch (type.DbType) { ! case DbType.Binary: ! { ! if (type.ArrayType != 0) { ! if (type.FormatCode == 0) ! { ! return ReadStringArray(type, length); ! } ! else ! { ! if (type.IsVector) ! { ! return ReadVector(type, length); ! } ! else ! { ! return ReadPrimitiveArray(type, length); ! } ! } } else { ! return ReadBytes(length); } - } ! case DbType.String: return ReadString(length); ! case DbType.Boolean: return ReadBoolean(); ! case DbType.Byte: return ReadByte(); ! case DbType.Decimal: string numericValue = ReadString(length); return Decimal.Parse(numericValue, NumberFormatInfo.InvariantInfo); ! case DbType.Currency: ! return ReadMoney(); ! case DbType.Single: return ReadSingle(); ! case DbType.Double: return ReadDouble(); ! case DbType.Int16: return ReadShort(); ! case DbType.Int32: return ReadInt(); ! case DbType.Int64: return ReadLong(); ! case DbType.Date: return ReadDate(); ! case DbType.Time: return ReadTime(); ! case DbType.DateTime: ! return ReadTimestamp(); default: return ReadBytes(length); --- 293,361 ---- public object ReadValue(PgType type, int length) { ! switch (type.DataType) { ! case PgDataType.Array: ! if (type.FormatCode == 0) { ! return ReadStringArray(type, length); } else { ! return ReadPrimitiveArray(type, length); } ! case PgDataType.Vector: ! return ReadVector(type, length); ! ! case PgDataType.Binary: ! return ReadBytes(length); ! ! case PgDataType.Char: ! case PgDataType.VarChar: return ReadString(length); ! case PgDataType.Boolean: return ReadBoolean(); ! case PgDataType.Byte: return ReadByte(); ! case PgDataType.Decimal: string numericValue = ReadString(length); return Decimal.Parse(numericValue, NumberFormatInfo.InvariantInfo); ! case PgDataType.Currency: ! return ReadCurrency(); ! case PgDataType.Float: return ReadSingle(); ! case PgDataType.Double: return ReadDouble(); ! case PgDataType.Int2: return ReadShort(); ! case PgDataType.Int4: return ReadInt(); ! case PgDataType.Int8: return ReadLong(); ! case PgDataType.Date: return ReadDate(); ! case PgDataType.Time: return ReadTime(); ! case PgDataType.TimeStamp: ! return ReadTimestamp(); + case PgDataType.Box: + case PgDataType.Path: + case PgDataType.Point: + case PgDataType.Polygon: + case PgDataType.Line: + case PgDataType.LSeg: default: return ReadBytes(length); *************** *** 381,411 **** int elementLen = ReadInt(); ! switch (type.DbType) { ! case DbType.Boolean: elementData = BitConverter.GetBytes(ReadBoolean()); break; ! case DbType.Byte: elementData = BitConverter.GetBytes(ReadByte()); break; ! case DbType.Single: elementData = BitConverter.GetBytes(ReadSingle()); break; ! case DbType.Double: elementData = BitConverter.GetBytes(ReadDouble()); break; ! case DbType.Int16: elementData = BitConverter.GetBytes(ReadShort()); break; ! case DbType.Int32: elementData = BitConverter.GetBytes(ReadInt()); break; ! case DbType.Int64: elementData = BitConverter.GetBytes(ReadLong()); break; --- 378,408 ---- int elementLen = ReadInt(); ! switch (type.DataType) { ! case PgDataType.Boolean: elementData = BitConverter.GetBytes(ReadBoolean()); break; ! case PgDataType.Byte: elementData = BitConverter.GetBytes(ReadByte()); break; ! case PgDataType.Float: elementData = BitConverter.GetBytes(ReadSingle()); break; ! case PgDataType.Double: elementData = BitConverter.GetBytes(ReadDouble()); break; ! case PgDataType.Int2: elementData = BitConverter.GetBytes(ReadShort()); break; ! case PgDataType.Int4: elementData = BitConverter.GetBytes(ReadInt()); break; ! case PgDataType.Int8: elementData = BitConverter.GetBytes(ReadLong()); break; Index: PgType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PgType.cs 29 Sep 2003 14:33:01 -0000 1.3 --- PgType.cs 17 Oct 2003 18:23:02 -0000 1.4 *************** *** 19,23 **** using System; using System.Data; - using PostgreSql.Data.PgSqlClient; namespace PostgreSql.Data.NPgClient --- 19,22 ---- *************** *** 29,39 **** private int oid; private string name; ! private DbType dbType; private Type systemType; private int arrayType; private short formatCode; ! private int size; ! private bool isVector; ! private PgDbType providerType; #endregion --- 28,36 ---- private int oid; private string name; ! private PgDataType dataType; private Type systemType; private int arrayType; private short formatCode; ! private int size; #endregion *************** *** 46,57 **** } ! public string Name { ! get { return name; } } ! public DbType DbType { ! get { return dbType; } } --- 43,54 ---- } ! public PgDataType DataType { ! get { return dataType; } } ! public string Name { ! get { return name; } } *************** *** 63,67 **** public int ArrayType { ! get { return arrayType; } } --- 60,74 ---- public int ArrayType { ! get ! { ! int type = arrayType; ! ! while (PgDbClient.Types[type].DataType == PgDataType.Array) ! { ! type = PgDbClient.Types[type].Oid; ! } ! ! return type; ! } } *************** *** 76,195 **** } - public bool IsVector - { - get { return isVector; } - } - - public PgDbType ProviderType - { - get { return providerType; } - } - #endregion #region CONSTRUCTORS ! public PgType(int oid, string name, DbType dbType, Type systemType, int arrayType, short formatCode, int size, bool isVector) { ! this.oid = oid; ! this.name = name; ! this.dbType = dbType; ! this.systemType = systemType; ! this.arrayType = arrayType; ! this.formatCode = formatCode; ! this.size = size; ! this.isVector = isVector; ! ! setProviderType(); } #endregion ! #region PRIVATE_METHODS ! private void setProviderType() ! { ! switch(dbType) { ! case DbType.Byte: ! providerType = PgDbType.Byte; ! break; ! ! case DbType.Boolean: ! providerType = PgDbType.Boolean; ! break; ! ! case DbType.AnsiStringFixedLength: ! case DbType.StringFixedLength: ! providerType = PgDbType.Char; ! break; ! ! case DbType.AnsiString: ! case DbType.String: ! providerType = PgDbType.VarChar; ! break; ! ! case DbType.Binary: ! { ! if (arrayType != 0) ! { ! providerType = PgDbType.Array; ! } ! else ! { ! providerType = PgDbType.Binary; ! } ! } ! break; ! ! case DbType.Date: ! providerType = PgDbType.Date; ! break; ! ! case DbType.Time: ! providerType = PgDbType.Time; ! break; ! ! case DbType.DateTime: ! providerType = PgDbType.TimeStamp; ! break; ! ! case DbType.Int16: ! case DbType.UInt16: ! providerType = PgDbType.Int2; ! break; ! ! case DbType.Int32: ! case DbType.UInt32: ! providerType = PgDbType.Int4; ! break; ! ! case DbType.Int64: ! case DbType.UInt64: ! providerType = PgDbType.Int8; ! break; ! ! case DbType.Single: ! providerType = PgDbType.Float; ! break; ! ! case DbType.Decimal: ! providerType = PgDbType.Decimal; ! break; ! ! case DbType.Double: ! providerType = PgDbType.Double; ! break; ! case DbType.Currency: ! providerType = PgDbType.Currency; ! break; ! case DbType.Guid: ! case DbType.VarNumeric: ! case DbType.SByte: ! default: ! throw new InvalidOperationException("Invalid data type specified."); } } --- 83,133 ---- } #endregion #region CONSTRUCTORS ! public PgType(int oid, string name, PgDataType providerType, Type systemType, int arrayType, short formatCode, int size) { ! this.oid = oid; ! this.name = name; ! this.systemType = systemType; ! this.arrayType = arrayType; ! this.formatCode = formatCode; ! this.size = size; } #endregion ! #region METHODS ! public bool IsNumeric() ! { ! bool returnValue = false; ! ! if (dataType == PgDataType.Currency || ! dataType == PgDataType.Int2 || ! dataType == PgDataType.Int4 || ! dataType == PgDataType.Int8 || ! dataType == PgDataType.Float || ! dataType == PgDataType.Double || ! dataType == PgDataType.Decimal || ! dataType == PgDataType.Byte) { ! returnValue = true; ! } ! return returnValue; ! } ! public bool IsLong() ! { ! bool returnValue = false; ! ! if (dataType == PgDataType.Binary) ! { ! returnValue = true; } + + return returnValue; } Index: PgTypeCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgTypeCollection.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PgTypeCollection.cs 22 Aug 2003 15:13:36 -0000 1.3 --- PgTypeCollection.cs 17 Oct 2003 18:23:02 -0000 1.4 *************** *** 83,100 **** } - public int IndexOf(DbType type) - { - int index = 0; - foreach(PgType item in this) - { - if (item.DbType == type) - { - return index; - } - index++; - } - return -1; - } - public void RemoveAt(string typeName) { --- 83,86 ---- *************** *** 109,115 **** } ! public PgType Add(int oid, string name, DbType dbType, Type systemType, int arrayType, short formatCode, int size, bool isVector) { ! PgType type = new PgType(oid, name, dbType, systemType, arrayType, formatCode, size, isVector); base.Add(type); --- 95,101 ---- } ! public PgType Add(int oid, string name, PgDataType dataType, Type systemType, int arrayType, short formatCode, int size) { ! PgType type = new PgType(oid, name, dataType, systemType, arrayType, formatCode, size); base.Add(type); |
From: <car...@us...> - 2003-10-17 15:14:40
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1:/tmp/cvs-serv25700 Modified Files: PgDbType.cs Log Message: Added definitions for Geometry types ( non finished yet ) Index: PgDbType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDbType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PgDbType.cs 19 Sep 2003 17:04:54 -0000 1.2 --- PgDbType.cs 17 Oct 2003 15:14:35 -0000 1.3 *************** *** 26,32 **** Array , Binary , - Byte , Boolean , Char , Currency , Date , --- 26,34 ---- Array , Binary , Boolean , + Box , + Byte , Char , + Circle , Currency , Date , *************** *** 37,45 **** Int4 , Int8 , Numeric , Text , Time , TimeStamp , ! VarChar } } --- 39,52 ---- Int4 , Int8 , + Line , + LSeg , Numeric , + Path , + Point , + Polygon , Text , Time , TimeStamp , ! VarChar } } |
From: <car...@us...> - 2003-10-17 15:14:15
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv25578 Modified Files: PgDbClient.cs Log Message: Added definitions for Geometry types ( non finished yet ) Index: PgDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** PgDbClient.cs 16 Oct 2003 10:06:38 -0000 1.20 --- PgDbClient.cs 17 Oct 2003 15:14:05 -0000 1.21 *************** *** 662,665 **** --- 662,674 ---- types.Add(26 , "oid" , DbType.Int32 , Type.GetType("System.Int32") , 0, 1, 4, false); types.Add(30 , "oidvector", DbType.Binary , Type.GetType("System.Array") , 26, 1, 4, true); + + types.Add(600 , "point" , DbType.Binary , Type.GetType("System.Array") , 701, 1, 16, false); + types.Add(601 , "lseg" , DbType.Binary , Type.GetType("System.Array") , 600, 1, 32, false); + types.Add(602 , "path" , DbType.String , Type.GetType("System.String") , 0, 0, -1, false); + types.Add(603 , "box" , DbType.Binary , Type.GetType("System.Array") , 600, 1, 32, false); + types.Add(604 , "polygon" , DbType.String , Type.GetType("System.String") , 0, 0, -1, false); + types.Add(628 , "line" , DbType.Binary , Type.GetType("System.Array") , 701, 1, 32, false); + types.Add(718 , "circle" , DbType.String , Type.GetType("System.String") , 0, 1, 24, false); + types.Add(700 , "float4" , DbType.Single , Type.GetType("System.Single") , 0, 1, 4, false); types.Add(701 , "float8" , DbType.Double , Type.GetType("System.Double") , 0, 1, 8, false); |
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-serv22952 Modified Files: TlsClientCertificate.cs TlsClientCertificateVerify.cs TlsClientFinished.cs TlsClientHello.cs TlsClientKeyExchange.cs TlsServerCertificate.cs TlsServerCertificateRequest.cs TlsServerFinished.cs TlsServerHello.cs TlsServerHelloDone.cs TlsServerKeyExchange.cs Log Message: Added changes for allow, in the future, the handshake layer to work with SSL3 protocol 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.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsClientCertificate.cs 14 Oct 2003 10:14:25 -0000 1.3 --- TlsClientCertificate.cs 16 Oct 2003 14:25:57 -0000 1.4 *************** *** 52,56 **** #region PROTECTED_METHODS ! protected override void Fill() { #warning "Check which type of certificates has been requested by the server" --- 52,61 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { #warning "Check which type of certificates has been requested by the server" Index: TlsClientCertificateVerify.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/TlsClientCertificateVerify.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TlsClientCertificateVerify.cs 11 Oct 2003 10:09:37 -0000 1.1 --- TlsClientCertificateVerify.cs 16 Oct 2003 14:25:57 -0000 1.2 *************** *** 51,55 **** #region PROTECTED_METHODS ! protected override void Fill() { #warning "Process message here" --- 51,60 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { #warning "Process message here" 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.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsClientFinished.cs 14 Oct 2003 10:14:25 -0000 1.3 --- TlsClientFinished.cs 16 Oct 2003 14:25:57 -0000 1.4 *************** *** 51,55 **** #region PROTECTED_METHODS ! protected override void Fill() { // Get hashes of handshake messages --- 51,60 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { // Get hashes of handshake messages Index: TlsClientHello.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/TlsClientHello.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsClientHello.cs 14 Oct 2003 09:49:02 -0000 1.3 --- TlsClientHello.cs 16 Oct 2003 14:25:57 -0000 1.4 *************** *** 62,66 **** #region PROTECTED_METHODS ! protected override void Fill() { // Client Version --- 62,71 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { // Client Version Index: TlsClientKeyExchange.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/TlsClientKeyExchange.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TlsClientKeyExchange.cs 13 Oct 2003 20:48:19 -0000 1.2 --- TlsClientKeyExchange.cs 16 Oct 2003 14:25:57 -0000 1.3 *************** *** 44,48 **** #region PROTECTED_METHODS ! protected override void Fill() { // Compute pre master secret --- 44,53 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { // Compute pre master secret Index: TlsServerCertificate.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/TlsServerCertificate.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsServerCertificate.cs 13 Oct 2003 20:48:19 -0000 1.3 --- TlsServerCertificate.cs 16 Oct 2003 14:25:57 -0000 1.4 *************** *** 69,73 **** #region PROTECTED_METHODS ! protected override void Parse() { this.certificates = new X509CertificateCollection(); --- 69,78 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { this.certificates = new X509CertificateCollection(); Index: TlsServerCertificateRequest.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/TlsServerCertificateRequest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsServerCertificateRequest.cs 13 Oct 2003 20:48:19 -0000 1.3 --- TlsServerCertificateRequest.cs 16 Oct 2003 14:25:57 -0000 1.4 *************** *** 62,66 **** #region PROTECTED_METHODS ! protected override void Parse() { // Read requested certificate types --- 62,71 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { // Read requested certificate types 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.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TlsServerFinished.cs 14 Oct 2003 10:14:25 -0000 1.4 --- TlsServerFinished.cs 16 Oct 2003 14:25:57 -0000 1.5 *************** *** 52,56 **** #region PROTECTED_METHODS ! protected override void Parse() { byte[] serverPRF = ReadBytes((int)Length); --- 52,61 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { byte[] serverPRF = ReadBytes((int)Length); Index: TlsServerHello.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/TlsServerHello.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsServerHello.cs 13 Oct 2003 20:48:19 -0000 1.3 --- TlsServerHello.cs 16 Oct 2003 14:25:57 -0000 1.4 *************** *** 65,69 **** #region PROTECTED_METHODS ! protected override void Parse() { // Read protocol version --- 65,74 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { // Read protocol version Index: TlsServerHelloDone.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/TlsServerHelloDone.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsServerHelloDone.cs 13 Oct 2003 20:48:19 -0000 1.3 --- TlsServerHelloDone.cs 16 Oct 2003 14:25:57 -0000 1.4 *************** *** 51,55 **** #region PROTECTED_METHODS ! protected override void Parse() { } --- 51,59 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! } ! ! protected override void ProcessAsTls1() { } 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.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TlsServerKeyExchange.cs 14 Oct 2003 10:14:25 -0000 1.4 --- TlsServerKeyExchange.cs 16 Oct 2003 14:25:57 -0000 1.5 *************** *** 63,67 **** #region PROTECTED_METHODS ! protected override void Parse() { rsaParams = new RSAParameters(); --- 63,72 ---- #region PROTECTED_METHODS ! protected override void ProcessAsSsl3() ! { ! throw new NotSupportedException(); ! } ! ! protected override void ProcessAsTls1() { rsaParams = new RSAParameters(); |
From: <car...@us...> - 2003-10-16 14:27:31
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv23124 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** changelog.txt 15 Oct 2003 14:34:10 -0000 1.42 --- changelog.txt 16 Oct 2003 14:26:50 -0000 1.43 *************** *** 2,5 **** --- 2,14 ---- ------------------------------------------------------- + + 2003-10-16 Carlos Guzmán Álvarez <car...@te...> + + * TLS Library: + + - Added changes for allow, in the future, the handshake layer + to work with SSL3 protocol. + + < --------------------------- Release Candidate 1 ------------------------------ > |
From: <car...@us...> - 2003-10-16 14:26:51
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake In directory sc8-pr-cvs1:/tmp/cvs-serv22906 Modified Files: TlsHandshakeMessage.cs Log Message: Added changes for allow, in the future, the handshake layer to work with SSL3 protocol Index: TlsHandshakeMessage.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/TlsHandshakeMessage.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TlsHandshakeMessage.cs 14 Oct 2003 10:14:10 -0000 1.5 --- TlsHandshakeMessage.cs 16 Oct 2003 14:25:43 -0000 1.6 *************** *** 67,72 **** this.contentType = contentType; ! // Fill message contents ! this.Fill(); } --- 67,72 ---- this.contentType = contentType; ! // Process message ! this.process(); } *************** *** 77,82 **** this.handshakeType = handshakeType; ! // Parse message ! this.Parse(); } --- 77,82 ---- this.handshakeType = handshakeType; ! // Process message ! this.process(); } *************** *** 85,88 **** --- 85,102 ---- #region METHODS + private void process() + { + switch (this.session.Context.Protocol) + { + case TlsProtocol.Tls1: + this.ProcessAsTls1(); + break; + + case TlsProtocol.Ssl3: + this.ProcessAsSsl3(); + break; + } + } + public virtual void UpdateSession() { *************** *** 94,105 **** } - protected virtual void Parse() - { - } - - protected virtual void Fill() - { - } - public virtual byte[] EncodeMessage() { --- 108,111 ---- *************** *** 117,121 **** } ! return result; } --- 123,135 ---- } ! return result; ! } ! ! protected virtual void ProcessAsTls1() ! { ! } ! ! protected virtual void ProcessAsSsl3() ! { } |
From: <car...@us...> - 2003-10-16 14:26:32
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1:/tmp/cvs-serv22846 Modified Files: TlsProtocol.cs Log Message: Added changes for allow, in the future, the handshake layer to work with SSL3 protocol Index: TlsProtocol.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsProtocol.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TlsProtocol.cs 11 Oct 2003 10:04:20 -0000 1.1 --- TlsProtocol.cs 16 Oct 2003 14:25:30 -0000 1.2 *************** *** 30,34 **** { Tls1 = (0x03 << 8) | 0x01, ! // Ssl3 = (0x03 << 8) | 0x00 } } --- 30,34 ---- { Tls1 = (0x03 << 8) | 0x01, ! Ssl3 = (0x03 << 8) | 0x00 } } |
From: <car...@us...> - 2003-10-16 12:46:59
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/WindowsSetup In directory sc8-pr-cvs1:/tmp/cvs-serv19793 Modified Files: PgSqlClientSetup.gi2 Log Message: Prepare for Beta 3 release Index: PgSqlClientSetup.gi2 =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/WindowsSetup/PgSqlClientSetup.gi2,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PgSqlClientSetup.gi2 11 Oct 2003 10:12:20 -0000 1.4 --- PgSqlClientSetup.gi2 16 Oct 2003 10:35:11 -0000 1.5 *************** *** 5,11 **** <component id="Main" name="Main"> <files> ! <file src="..\build\net-1.0\distribution\*.*" dst="%InstallPath%\*.*" /> ! <file src="..\build\net-1.0\distribution\PostgreSql.Data.PgSqlClient.dll" dst="%GAC%\PostgreSql.Data.PgSqlClient.dll" /> ! <file src="..\build\net-1.0\distribution\System.Security.Tls.dll" dst="%GAC%\System.Security.Tls.dll" /> </files> <shortcuts> --- 5,11 ---- <component id="Main" name="Main"> <files> ! <file src="..\build\net-1.1\distribution\*.*" dst="%InstallPath%\*.*" /> ! <file src="..\build\net-1.1\distribution\PostgreSql.Data.PgSqlClient.dll" dst="%GAC%\PostgreSql.Data.PgSqlClient.dll" /> ! <file src="..\build\net-1.1\distribution\Mono.Security.Protocol.Tls.dll" dst="%GAC%\Mono.Security.Protocol.Tls.dll" /> </files> <shortcuts> *************** *** 23,35 **** <component id="License" name="License"> <files> ! <file src="..\build\net-1.0\distribution\LICENSE.TXT" dst="%InstallPath%\*.*" /> </files> <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\License" cmdline="%InstallPath%\LICENSE.TXT" /> </shortcuts> </component> <component id="Readme" name="Readme"> <files> ! <file src="..\build\net-1.0\distribution\README.TXT" dst="%InstallPath%\*.*" /> </files> <shortcuts> --- 23,35 ---- <component id="License" name="License"> <files> ! <file src="..\build\net-1.1\distribution\license.txt" dst="%InstallPath%\*.*" /> </files> <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Licenses" cmdline="%InstallPath%\license.txt" /> </shortcuts> </component> <component id="Readme" name="Readme"> <files> ! <file src="..\build\net-1.1\distribution\readme.txt" dst="%InstallPath%\*.*" /> </files> <shortcuts> *************** *** 39,43 **** <component id="Changes" name="Changes"> <files> ! <file src="..\build\net-1.0\distribution\CHANGES.TXT" dst="%InstallPath%\*.*" /> </files> <shortcuts> --- 39,43 ---- <component id="Changes" name="Changes"> <files> ! <file src="..\build\net-1.1\distribution\CHANGES.TXT" dst="%InstallPath%\*.*" /> </files> <shortcuts> *************** *** 92,103 **** <presetup> <file action="add" src="presetup\*.*"/> ! <file src="..\build\net-1.0\distribution\README.TXT" /> ! <file src="..\build\net-1.0\distribution\LICENSE.TXT" /> </presetup> </package> </packages> ! <!-- launchconditions> ! <launchcondition condition = "NETFrameworkInstalled(1.0)" msg="You need to have installed the Microsoft .NET Framework 1.0 before install the PgSqlClient .NET Data Provider" /> ! </launchconditions--> <variables> <var name="AppID" value="PgSqlClient ADO.NET Data Provider 1.0" /> --- 92,103 ---- <presetup> <file action="add" src="presetup\*.*"/> ! <file src="..\build\net-1.1\distribution\readme.txt" /> ! <file src="..\build\net-1.1\distribution\license.txt" /> </presetup> </package> </packages> ! <launchconditions> ! <launchcondition condition = "NETFrameworkInstalled(1.1)" msg="You need to have installed the Microsoft .NET Framework 1.1 before install the PgSqlClient .NET Data Provider" /> ! </launchconditions> <variables> <var name="AppID" value="PgSqlClient ADO.NET Data Provider 1.0" /> |
From: <car...@us...> - 2003-10-16 10:38:07
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv19717 Added Files: license.txt Log Message: Prepare for Beta 3 release |
From: <car...@us...> - 2003-10-16 10:36:05
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv19673 Modified Files: changes.txt readme.txt Log Message: Prepare for Beta 3 release Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** changes.txt 15 Oct 2003 14:34:10 -0000 1.12 --- changes.txt 16 Oct 2003 10:34:25 -0000 1.13 *************** *** 2,6 **** ------------------------------------------------------- ! Beta 3 ( XX-10-2003 ) ---- - - -- -- ---- - --- 2,6 ---- ------------------------------------------------------- ! Beta 3 ( 16-10-2003 ) ---- - - -- -- ---- - Index: readme.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/readme.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** readme.txt 11 Oct 2003 10:00:25 -0000 1.2 --- readme.txt 16 Oct 2003 10:34:25 -0000 1.3 *************** *** 16,24 **** PostgreSql.Data.PgSqlClient.License.txt (LGPL) ! PostgreSql.Data.PgSqlClient.License.html (LGPL) and ! Mono.Security.Protocol.Tls.txt (MIT/X11) --- 16,24 ---- PostgreSql.Data.PgSqlClient.License.txt (LGPL) ! PostgreSql.Data.PgSqlClient.License.html(LGPL) and ! Mono.Security.Protocol.Tls.License.txt (MIT/X11) |
From: <car...@us...> - 2003-10-16 10:06:41
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv15623 Modified Files: PgDbClient.cs Log Message: TLS Namespace change Index: PgDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** PgDbClient.cs 7 Oct 2003 09:06:15 -0000 1.19 --- PgDbClient.cs 16 Oct 2003 10:06:38 -0000 1.20 *************** *** 21,30 **** using System.IO; using System.Collections; using System.Net; using System.Net.Sockets; - using System.Text; ! using System.Security.Tls; ! using System.Security.Tls.Alerts; namespace PostgreSql.Data.NPgClient --- 21,30 ---- using System.IO; using System.Collections; + using System.Text; using System.Net; using System.Net.Sockets; ! using Mono.Security.Protocol.Tls; ! using Mono.Security.Protocol.Tls.Alerts; namespace PostgreSql.Data.NPgClient |
From: <car...@us...> - 2003-10-16 10:06:12
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1:/tmp/cvs-serv15469 Modified Files: PgCommandBuilder.cs Log Message: Minor change Index: PgCommandBuilder.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommandBuilder.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PgCommandBuilder.cs 9 Oct 2003 11:59:09 -0000 1.10 --- PgCommandBuilder.cs 16 Oct 2003 10:05:52 -0000 1.11 *************** *** 39,43 **** private PgCommand deleteCommand; private string separator; ! private string whereClausule1; private string whereClausule2; private string setClausule; --- 39,43 ---- private PgCommand deleteCommand; private string separator; ! // private string whereClausule1; private string whereClausule2; private string setClausule; *************** *** 125,129 **** sqlUpdate = "UPDATE {0} SET {1} WHERE ( {2} )"; sqlDelete = "DELETE FROM {0} WHERE ( {1} )"; ! whereClausule1 = "(({0} IS NULL AND ${1} = NULL) OR ({0} = ${2}))"; whereClausule2 = "({0} = ${1})"; setClausule = "{0} = ${1}"; --- 125,129 ---- sqlUpdate = "UPDATE {0} SET {1} WHERE ( {2} )"; sqlDelete = "DELETE FROM {0} WHERE ( {1} )"; ! // whereClausule1 = "(({0} IS NULL AND ${1} = NULL) OR ({0} = ${2}))"; whereClausule2 = "({0} = ${1})"; setClausule = "{0} = ${1}"; |
From: <car...@us...> - 2003-10-15 14:35:38
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv3920 Modified Files: PgSqlClient.build Log Message: Updated build file for handle new TLS library namespaces and assebly name Index: PgSqlClient.build =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.build,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PgSqlClient.build 11 Oct 2003 10:00:25 -0000 1.7 --- PgSqlClient.build 15 Oct 2003 14:35:05 -0000 1.8 *************** *** 15,19 **** <property name="build.dir" value="${base.build.dir}" /> ! <property name="tls.src.dir" value="PgSqlClient.Security.Tls\source" /> <property name="src.dir" value="${project.FormalName}\source" /> <property name="resources.dir" value="${src.dir}\Resources" /> --- 15,19 ---- <property name="build.dir" value="${base.build.dir}" /> ! <property name="tls.src.dir" value="Mono.Security.Protocol.Tls" /> <property name="src.dir" value="${project.FormalName}\source" /> <property name="resources.dir" value="${src.dir}\Resources" /> *************** *** 70,74 **** <!-- Build target for all existing platforms --> ! <target name="build-all" depends="check-build-config"> <!-- .NET Framework 1.0 --> <available type="Framework" resource="net-1.0" property="temp.framework.available" /> --- 70,74 ---- <!-- Build target for all existing platforms --> ! <target name="build-all" depends="check-build-config"> <!-- .NET Framework 1.0 --> <available type="Framework" resource="net-1.0" property="temp.framework.available" /> *************** *** 88,92 **** <call target="distribution" /> </if> ! <!-- .NET Framework 1.1 --> <available type="Framework" resource="net-1.1" property="temp.framework.available" /> --- 88,92 ---- <call target="distribution" /> </if> ! <!-- .NET Framework 1.1 --> <available type="Framework" resource="net-1.1" property="temp.framework.available" /> *************** *** 126,130 **** <!-- compile Mono.Security.TLS --> ! <csc output="${build.dir}\Mono.Security.Tls.dll" target="library" define="${build.define}"> <sources> <includes name="${tls.src.dir}/**/*.cs" /> --- 126,130 ---- <!-- compile Mono.Security.TLS --> ! <csc output="${build.dir}\Mono.Security.Protocol.Tls.dll" target="library" define="${build.define}"> <sources> <includes name="${tls.src.dir}/**/*.cs" /> *************** *** 155,159 **** <absolute file="System.Drawing.dll" /> <absolute file="System.XML.dll" /> ! <includes name="${build.dir}/Mono.Security.Tls.dll" /> </references> <arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp" /> --- 155,159 ---- <absolute file="System.Drawing.dll" /> <absolute file="System.XML.dll" /> ! <includes name="${build.dir}/Mono.Security.Protocol.Tls.dll" /> </references> <arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp" /> |
From: <car...@us...> - 2003-10-15 14:34:15
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv3734 Modified Files: changelog.txt changes.txt Log Message: Updated CHANGELOG.TXT Updated CHANGES.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** changelog.txt 10 Oct 2003 15:42:13 -0000 1.41 --- changelog.txt 15 Oct 2003 14:34:10 -0000 1.42 *************** *** 2,5 **** --- 2,20 ---- ------------------------------------------------------- + < --------------------------- Release Candidate 1 ------------------------------ > + + + 2003-10-14 Carlos Guzmán Álvarez <car...@te...> + + + * TLS library: + + - Added new TlsStream class. + TlsStreamReader and TlsStreamWriter will be replaced by this class soon. + TlsHandhskaeMessage inherits from this class. + + - TlsSessionContext.cs: + + - Added methods GetUnixTime and GetSecureRandomBytes. 2003-10-10 Carlos Guzmán Álvarez <car...@te...> Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** changes.txt 7 Oct 2003 09:44:00 -0000 1.11 --- changes.txt 15 Oct 2003 14:34:10 -0000 1.12 *************** *** 7,11 **** - Bug fixes. ! - Better fit to ADO.NET - Improved Command Builder implementation. --- 7,11 ---- - Bug fixes. ! - Better fit to ADO.NET. - Improved Command Builder implementation. *************** *** 13,17 **** - Improved design time support for PgParameterCollection class. ! - Implementd PgDataReader.NextResult method. - Added implementation for array data type parameters. --- 13,17 ---- - Improved design time support for PgParameterCollection class. ! - Implemented PgDataReader.NextResult method. - Added implementation for array data type parameters. |
From: <car...@us...> - 2003-10-14 10:14:42
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Alerts In directory sc8-pr-cvs1:/tmp/cvs-serv4193 Modified Files: TlsAlert.cs Log Message: - TlsStreamReader and TlsStreamWriter classes are replaced by TlStream class. - Added license heaqder to TlsStream class. Index: TlsAlert.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Alerts/TlsAlert.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TlsAlert.cs 11 Oct 2003 10:08:17 -0000 1.1 --- TlsAlert.cs 14 Oct 2003 10:14:39 -0000 1.2 *************** *** 65,69 **** #endregion ! internal abstract class TlsAlert : TlsStreamWriter { #region FIELDS --- 65,69 ---- #endregion ! internal abstract class TlsAlert : TlsStream { #region FIELDS *************** *** 75,79 **** #endregion ! #region CONSTRUCTORS public TlsSession Session --- 75,79 ---- #endregion ! #region PROPERTIES public TlsSession Session |
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 |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake In directory sc8-pr-cvs1:/tmp/cvs-serv4139 Modified Files: TlsHandshakeHashes.cs TlsHandshakeMessage.cs Log Message: - TlsStreamReader and TlsStreamWriter classes are replaced by TlStream class. - Added license heaqder to TlsStream class. Index: TlsHandshakeHashes.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/TlsHandshakeHashes.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TlsHandshakeHashes.cs 11 Oct 2003 10:08:57 -0000 1.1 --- TlsHandshakeHashes.cs 14 Oct 2003 10:14:10 -0000 1.2 *************** *** 34,38 **** private MD5CryptoServiceProvider md5; private SHA1CryptoServiceProvider sha; ! private TlsStreamWriter messages; #endregion --- 34,38 ---- private MD5CryptoServiceProvider md5; private SHA1CryptoServiceProvider sha; ! private TlsStream messages; #endregion *************** *** 42,46 **** public TlsHandshakeHashes() { ! this.messages = new TlsStreamWriter(); this.md5 = new MD5CryptoServiceProvider(); this.sha = new SHA1CryptoServiceProvider(); --- 42,46 ---- public TlsHandshakeHashes() { ! this.messages = new TlsStream(); this.md5 = new MD5CryptoServiceProvider(); this.sha = new SHA1CryptoServiceProvider(); *************** *** 80,88 **** sha.Initialize(); - // byte[] tmp = new byte[messages.GetBytes().Length]; byte[] tmp = new byte[messages.Length]; ! md5.TransformBlock(messages.GetBytes(), 0, tmp.Length, tmp, 0); ! sha.TransformBlock(messages.GetBytes(), 0, tmp.Length, tmp, 0); } --- 80,87 ---- sha.Initialize(); byte[] tmp = new byte[messages.Length]; ! md5.TransformBlock(messages.ToArray(), 0, tmp.Length, tmp, 0); ! sha.TransformBlock(messages.ToArray(), 0, tmp.Length, tmp, 0); } Index: TlsHandshakeMessage.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/TlsHandshakeMessage.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TlsHandshakeMessage.cs 14 Oct 2003 09:48:22 -0000 1.4 --- TlsHandshakeMessage.cs 14 Oct 2003 10:14:10 -0000 1.5 *************** *** 108,112 **** if (CanWrite) { ! TlsStreamWriter c = new TlsStreamWriter(); c.Write((byte)HandshakeType); --- 108,112 ---- if (CanWrite) { ! TlsStream c = new TlsStream(); c.Write((byte)HandshakeType); *************** *** 114,118 **** c.Write(ToArray()); ! result = c.GetBytes(); } --- 114,118 ---- c.Write(ToArray()); ! result = c.ToArray(); } |
From: <car...@us...> - 2003-10-14 10:14:03
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1:/tmp/cvs-serv4083 Modified Files: TlsSessionContext.cs TlsSocket.cs TlsStream.cs Log Message: - TlsStreamReader and TlsStreamWriter classes are replaced by TlStream class. - Added license heaqder to TlsStream class. Index: TlsSessionContext.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsSessionContext.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsSessionContext.cs 14 Oct 2003 09:48:01 -0000 1.3 --- TlsSessionContext.cs 14 Oct 2003 10:13:58 -0000 1.4 *************** *** 214,226 **** public byte[] CreatePremasterSecret() { ! TlsStreamWriter stream = new TlsStreamWriter(); // Write protocol version ! stream.WriteShort((short)protocol); // Generate random bytes stream.Write(GetSecureRandomBytes(46)); ! byte[] preMasterSecret = stream.GetBytes(); stream.Reset(); --- 214,226 ---- public byte[] CreatePremasterSecret() { ! TlsStream stream = new TlsStream(); // Write protocol version ! stream.Write((short)protocol); // Generate random bytes stream.Write(GetSecureRandomBytes(46)); ! byte[] preMasterSecret = stream.ToArray(); stream.Reset(); *************** *** 232,236 **** { TlsCipherSuite cipherSuite = cipher; ! TlsStreamWriter seed = new TlsStreamWriter(); // Seed --- 232,236 ---- { TlsCipherSuite cipherSuite = cipher; ! TlsStream seed = new TlsStream(); // Seed *************** *** 240,244 **** // Create master secret masterSecret = new byte[preMasterSecret.Length]; ! masterSecret = PRF(preMasterSecret, "master secret", seed.GetBytes(), 48); seed.Reset(); --- 240,244 ---- // Create master secret masterSecret = new byte[preMasterSecret.Length]; ! masterSecret = PRF(preMasterSecret, "master secret", seed.ToArray(), 48); seed.Reset(); *************** *** 247,251 **** public void CreateKeys() { ! TlsStreamWriter seed = new TlsStreamWriter(); // Seed --- 247,251 ---- public void CreateKeys() { ! TlsStream seed = new TlsStream(); // Seed *************** *** 254,261 **** // Create keyblock ! TlsStreamReader keyBlock = new TlsStreamReader( PRF(masterSecret, "key expansion", ! seed.GetBytes(), cipher.GetKeyBlockSize())); --- 254,261 ---- // Create keyblock ! TlsStream keyBlock = new TlsStream( PRF(masterSecret, "key expansion", ! seed.ToArray(), cipher.GetKeyBlockSize())); *************** *** 286,291 **** // Generate final write keys ! byte[] finalClientWriteKey = PRF(clientWriteKey, "client write key", seed.GetBytes(), cipher.KeyMaterialSize); ! byte[] finalServerWriteKey = PRF(serverWriteKey, "server write key", seed.GetBytes(), cipher.KeyMaterialSize); clientWriteKey = finalClientWriteKey; --- 286,291 ---- // Generate final write keys ! byte[] finalClientWriteKey = PRF(clientWriteKey, "client write key", seed.ToArray(), cipher.KeyMaterialSize); ! byte[] finalServerWriteKey = PRF(serverWriteKey, "server write key", seed.ToArray(), cipher.KeyMaterialSize); clientWriteKey = finalClientWriteKey; *************** *** 293,297 **** // Generate IV block ! byte[] ivBlock = PRF(new byte[]{}, "IV block", seed.GetBytes(), cipher.IvSize*2); // Generate IV keys clientWriteIV = new byte[cipher.IvSize]; --- 293,298 ---- // Generate IV block ! byte[] ivBlock = PRF(new byte[]{}, "IV block", seed.ToArray(), cipher.IvSize*2); ! // Generate IV keys clientWriteIV = new byte[cipher.IvSize]; *************** *** 314,321 **** // Seed ! TlsStreamWriter seedStream = new TlsStreamWriter(); seedStream.Write(Encoding.ASCII.GetBytes(label)); seedStream.Write(data); ! byte[] seed = seedStream.GetBytes(); seedStream.Reset(); --- 315,322 ---- // Seed ! TlsStream seedStream = new TlsStream(); seedStream.Write(Encoding.ASCII.GetBytes(label)); seedStream.Write(data); ! byte[] seed = seedStream.ToArray(); seedStream.Reset(); *************** *** 353,358 **** } ! HMAC hmac = new HMAC(hashName, secret); ! TlsStreamWriter resMacs = new TlsStreamWriter(); byte[][] hmacs = new byte[iterations + 1][]; --- 354,359 ---- } ! HMAC hmac = new HMAC(hashName, secret); ! TlsStream resMacs = new TlsStream(); byte[][] hmacs = new byte[iterations + 1][]; *************** *** 360,369 **** for (int i = 1; i <= iterations; i++) { ! TlsStreamWriter hcseed = new TlsStreamWriter(); hmac.TransformFinalBlock(hmacs[i-1], 0, hmacs[i-1].Length); hmacs[i] = hmac.Hash; hcseed.Write(hmacs[i]); hcseed.Write(seed); ! hmac.TransformFinalBlock(hcseed.GetBytes(), 0, hcseed.GetBytes().Length); resMacs.Write(hmac.Hash); hcseed.Reset(); --- 361,370 ---- for (int i = 1; i <= iterations; i++) { ! TlsStream hcseed = new TlsStream(); hmac.TransformFinalBlock(hmacs[i-1], 0, hmacs[i-1].Length); hmacs[i] = hmac.Hash; hcseed.Write(hmacs[i]); hcseed.Write(seed); ! hmac.TransformFinalBlock(hcseed.ToArray(), 0, (int)hcseed.Length); resMacs.Write(hmac.Hash); hcseed.Reset(); *************** *** 372,376 **** byte[] res = new byte[length]; ! System.Array.Copy(resMacs.GetBytes(), 0, res, 0, res.Length); resMacs.Reset(); --- 373,377 ---- byte[] res = new byte[length]; ! System.Array.Copy(resMacs.ToArray(), 0, res, 0, res.Length); resMacs.Reset(); Index: TlsSocket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsSocket.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TlsSocket.cs 13 Oct 2003 20:47:11 -0000 1.3 --- TlsSocket.cs 14 Oct 2003 10:13:58 -0000 1.4 *************** *** 204,208 **** } ! TlsStreamReader message = new TlsStreamReader(buffer); // Check that the message as a valid protocol version --- 204,208 ---- } ! TlsStream message = new TlsStream(buffer); // Check that the message as a valid protocol version *************** *** 225,233 **** contentType, protocol, ! message.GetBytes()); } } ! byte[] result = message.GetBytes(); // Process record --- 225,233 ---- contentType, protocol, ! message.ToArray()); } } ! byte[] result = message.ToArray(); // Process record *************** *** 253,257 **** } // Update handshakes of current messages ! this.session.Context.HandshakeHashes.Update(message.GetBytes()); break; --- 253,257 ---- } // Update handshakes of current messages ! this.session.Context.HandshakeHashes.Update(message.ToArray()); break; *************** *** 289,293 **** } ! private TlsStreamReader decryptRecordFragment(TlsContentType contentType, TlsProtocol protocol, byte[] fragment) --- 289,293 ---- } ! private TlsStream decryptRecordFragment(TlsContentType contentType, TlsProtocol protocol, byte[] fragment) *************** *** 326,330 **** session.Context.ReadSequenceNumber++; ! return new TlsStreamReader(dcrFragment); } --- 326,330 ---- session.Context.ReadSequenceNumber++; ! return new TlsStream(dcrFragment); } *************** *** 336,340 **** { // Write record ! int bytesSent = this.sendRecord(TlsContentType.Alert, alert.GetBytes()); // Update session --- 336,340 ---- { // Write record ! int bytesSent = this.sendRecord(TlsContentType.Alert, alert.ToArray()); // Update session *************** *** 400,411 **** // Write tls message ! TlsStreamWriter record = new TlsStreamWriter(); record.Write((byte)contentType); ! record.WriteShort((short)TlsProtocol.Tls1); ! record.WriteShort((short)fragment.Length); record.Write(fragment); // Write record ! bytesSent += base.Send(record.GetBytes()); // Reset record data --- 400,411 ---- // Write tls message ! TlsStream record = new TlsStream(); record.Write((byte)contentType); ! record.Write((short)TlsProtocol.Tls1); ! record.Write((short)fragment.Length); record.Write(fragment); // Write record ! bytesSent += base.Send(record.ToArray()); // Reset record data *************** *** 456,460 **** #region MESSAGE_PROCESSING ! private void processHandshakeMessage(TlsStreamReader handMsg) { TlsHandshakeType handshakeType = (TlsHandshakeType)handMsg.ReadByte(); --- 456,460 ---- #region MESSAGE_PROCESSING ! private void processHandshakeMessage(TlsStream handMsg) { TlsHandshakeType handshakeType = (TlsHandshakeType)handMsg.ReadByte(); *************** *** 514,527 **** private byte[] encodeServerRecordMAC(TlsContentType contentType, byte[] fragment) { ! TlsStreamWriter data = new TlsStreamWriter(); ! byte[] result = null; ! data.WriteLong(session.Context.ReadSequenceNumber); data.Write((byte)contentType); ! data.WriteShort((short)TlsProtocol.Tls1); ! data.WriteShort((short)fragment.Length); data.Write(fragment); ! result = session.Context.Cipher.ServerHMAC.ComputeHash(data.GetBytes()); data.Reset(); --- 514,527 ---- private byte[] encodeServerRecordMAC(TlsContentType contentType, byte[] fragment) { ! TlsStream data = new TlsStream(); ! byte[] result = null; ! data.Write(session.Context.ReadSequenceNumber); data.Write((byte)contentType); ! data.Write((short)TlsProtocol.Tls1); ! data.Write((short)fragment.Length); data.Write(fragment); ! result = session.Context.Cipher.ServerHMAC.ComputeHash(data.ToArray()); data.Reset(); *************** *** 532,545 **** private byte[] encodeClientRecordMAC(TlsContentType contentType, byte[] fragment) { ! TlsStreamWriter data = new TlsStreamWriter(); ! byte[] result = null; ! data.WriteLong(session.Context.WriteSequenceNumber); data.Write((byte)contentType); ! data.WriteShort((short)TlsProtocol.Tls1); ! data.WriteShort((short)fragment.Length); data.Write(fragment); ! result = session.Context.Cipher.ClientHMAC.ComputeHash(data.GetBytes()); data.Reset(); --- 532,545 ---- private byte[] encodeClientRecordMAC(TlsContentType contentType, byte[] fragment) { ! TlsStream data = new TlsStream(); ! byte[] result = null; ! data.Write(session.Context.WriteSequenceNumber); data.Write((byte)contentType); ! data.Write((short)TlsProtocol.Tls1); ! data.Write((short)fragment.Length); data.Write(fragment); ! result = session.Context.Cipher.ClientHMAC.ComputeHash(data.ToArray()); data.Reset(); Index: TlsStream.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsStream.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TlsStream.cs 14 Oct 2003 09:46:19 -0000 1.1 --- TlsStream.cs 14 Oct 2003 10:13:58 -0000 1.2 *************** *** 1,2 **** --- 1,26 ---- + /* Transport Security Layer (TLS) + * Copyright (c) 2003 Carlos Guzmán Álvarez + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + using System; using System.IO; *************** *** 15,18 **** --- 39,61 ---- #endregion + #region PROPERTIES + + public bool EOF + { + get + { + if (this.Position < this.Length) + { + return false; + } + else + { + return true; + } + } + } + + #endregion + #region STREAM_PROPERTIES *************** *** 56,60 **** public TlsStream(byte[] data) : base() { ! this.buffer = new MemoryStream(data, false); this.canRead = true; this.canWrite = false; --- 99,103 ---- public TlsStream(byte[] data) : base() { ! this.buffer = new MemoryStream(data); this.canRead = true; this.canWrite = false; |