pgsqlclient-checkins Mailing List for PostgreSqlClient (Page 46)
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-09-12 20:50:05
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv16222 Modified Files: changes.txt Log Message: Prepare for Beta 1 Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** changes.txt 12 Sep 2003 20:47:43 -0000 1.7 --- changes.txt 12 Sep 2003 20:50:02 -0000 1.8 *************** *** 18,21 **** --- 18,23 ---- * Added SQL Server like Stored Procedure calls. + * Improved compatibility with mono:: (http://www.go-mono.com) + |
|
From: <car...@us...> - 2003-09-12 20:49:09
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/WindowsSetup
In directory sc8-pr-cvs1:/tmp/cvs-serv16016
Modified Files:
PgSqlClientSetup.gi2
Log Message:
Prepare for Beta 1
Index: PgSqlClientSetup.gi2
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/WindowsSetup/PgSqlClientSetup.gi2,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgSqlClientSetup.gi2 2 Aug 2003 19:43:03 -0000 1.1.1.1
--- PgSqlClientSetup.gi2 12 Sep 2003 20:49:06 -0000 1.2
***************
*** 1,3 ****
! <gi2project version="3.6">
<packages>
<package filename="setup" main="1">
--- 1,3 ----
! <gi2project version="3.7">
<packages>
<package filename="setup" main="1">
***************
*** 7,10 ****
--- 7,11 ----
<file src="..\build\distribution\*.*" dst="%InstallPath%\*.*" />
<file src="..\build\distribution\PostgreSql.Data.PgSqlClient.dll" dst="%GAC%\PostgreSql.Data.PgSqlClient.dll" />
+ <file src="..\build\distribution\System.Security.Tls.dll" dst="%GAC%\System.Security.Tls.dll" />
</files>
<shortcuts>
***************
*** 100,105 ****
</launchconditions-->
<variables>
! <var name="AppID" value="PgSqlClient ADO.NET Data Provider 1.0 Alpha 3" />
! <var name="AppName" value="PgSqlClient ADO.NET Data Provider 1.0 Alpha 3" />
<var name="OutputPath" value="Output" type="normal"/>
<var name="Password" type="normal"/>
--- 101,106 ----
</launchconditions-->
<variables>
! <var name="AppID" value="PgSqlClient ADO.NET Data Provider 1.0 Beta 1" />
! <var name="AppName" value="PgSqlClient ADO.NET Data Provider 1.0 Beta 1" />
<var name="OutputPath" value="Output" type="normal"/>
<var name="Password" type="normal"/>
|
|
From: <car...@us...> - 2003-09-12 20:48:30
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv15866 Modified Files: changelog.txt Log Message: Prepare for Beta 1 Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** changelog.txt 2 Sep 2003 10:34:18 -0000 1.22 --- changelog.txt 12 Sep 2003 20:48:26 -0000 1.23 *************** *** 2,5 **** --- 2,7 ---- ------------------------------------------------------- + < ----------------------------------- Beta 2 ---------------------------------- > + 2003-09-02 Carlos Guzmán Álvarez <car...@te...> |
|
From: <car...@us...> - 2003-09-12 20:47:46
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv15691 Modified Files: changes.txt DotNETBuild.bat PgSqlClient.build PgSqlClient_Mono.build Log Message: Prepare for Beta 1 Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** changes.txt 22 Aug 2003 19:50:31 -0000 1.6 --- changes.txt 12 Sep 2003 20:47:43 -0000 1.7 *************** *** 3,10 **** ! Alpha 4 ( XX-08-2003 ) ! ----- - - -- -- ---- - * Better fit to ADO.NET. * Improved Command Builder implementation. --- 3,13 ---- ! Beta 1 ( 12-09-2003 ) ! ---- - - -- -- ---- - * Better fit to ADO.NET. + + * Simple Transport Layer security ( TLS 1.0 ) implementation + It's usined yet for both TLS and non-TLS connetions but it's not finished yet. * Improved Command Builder implementation. Index: DotNETBuild.bat =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/DotNETBuild.bat,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** DotNETBuild.bat 2 Aug 2003 19:42:37 -0000 1.1.1.1 --- DotNETBuild.bat 12 Sep 2003 20:47:43 -0000 1.2 *************** *** 1 **** ! nant -buildfile:PgSqlClient.build \ No newline at end of file --- 1 ---- ! nant -buildfile:PgSqlClient.build %1 %2 %3 %4 Index: PgSqlClient.build =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PgSqlClient.build 31 Aug 2003 12:55:21 -0000 1.2 --- PgSqlClient.build 12 Sep 2003 20:47:43 -0000 1.3 *************** *** 136,141 **** <mkdir dir="${build.dir}" failonerror="false" /> ! <!-- compile PgSqlClient.Security.TLS --> ! <csc output="${build.dir}\PgSqlClient.Security.Tls.dll" target="library" define="${build.define}"> <sources> <includes name="${tls.src.dir}/**/*.cs" /> --- 136,141 ---- <mkdir dir="${build.dir}" failonerror="false" /> ! <!-- compile System.Security.TLS --> ! <csc output="${build.dir}\System.Security.Tls.dll" target="library" define="${build.define}"> <sources> <includes name="${tls.src.dir}/**/*.cs" /> *************** *** 165,169 **** <absolute file="System.Drawing.dll" /> <absolute file="System.XML.dll" /> ! <includes name="${build.dir}/PgSqlClient.Security.Tls.dll" /> </references> <arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp" /> --- 165,169 ---- <absolute file="System.Drawing.dll" /> <absolute file="System.XML.dll" /> ! <includes name="${build.dir}/System.Security.Tls.dll" /> </references> <arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp" /> Index: PgSqlClient_Mono.build =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient_Mono.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PgSqlClient_Mono.build 31 Aug 2003 12:55:21 -0000 1.2 --- PgSqlClient_Mono.build 12 Sep 2003 20:47:43 -0000 1.3 *************** *** 49,54 **** <mkdir dir="${build.dir}" failonerror="false" /> ! <!-- compile PgSqlClient.Security.TLS --> ! <csc output="${build.dir}\PgSqlClient.Security.Tls.dll" target="library" define="${build.define}"> <sources> <includes name="${tls.src.dir}/**/*.cs" /> --- 49,54 ---- <mkdir dir="${build.dir}" failonerror="false" /> ! <!-- compile System.Security.TLS --> ! <csc output="${build.dir}\System.Security.Tls.dll" target="library" define="${build.define}"> <sources> <includes name="${tls.src.dir}/**/*.cs" /> *************** *** 78,82 **** <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Drawing.dll" /> <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" /> ! <includes name="${build.dir}/PgSqlClient.Security.Tls.dll" /> </references> <arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolboxBitmaps.PgConnection.bmp" /> --- 78,82 ---- <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Drawing.dll" /> <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" /> ! <includes name="${build.dir}/System.Security.Tls.dll" /> </references> <arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolboxBitmaps.PgConnection.bmp" /> |
|
From: <car...@us...> - 2003-09-12 18:44:33
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv21461
Modified Files:
TlsSession.cs
Log Message:
- Fixed session close for non secure connections.
- Improved session closing by reseting session information
Index: TlsSession.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSession.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** TlsSession.cs 12 Sep 2003 12:47:11 -0000 1.11
--- TlsSession.cs 12 Sep 2003 18:44:30 -0000 1.12
***************
*** 209,222 ****
// Write close notify
writer.WriteAlert(alert);
}
// Close streams
closeStreams();
-
- // Check that the session is finished by the client and by server
- if (!state.ConnectionEnd)
- {
- throw new TlsException("Invalid session termination");
- }
}
--- 209,222 ----
// Write close notify
writer.WriteAlert(alert);
+
+ // Check that the session is finished by the client and by server
+ if (!state.ConnectionEnd)
+ {
+ throw new TlsException("Invalid session termination");
+ }
}
// Close streams
closeStreams();
}
***************
*** 330,333 ****
--- 330,338 ----
socket.Close();
networkStream.Close();
+
+ // Reset session information
+ this.state = new TlsSessionState();
+ this.handshakeHashes = new TlsHandshakeHashes();
+ this.sessionId = new byte[0];
}
|
|
From: <car...@us...> - 2003-09-12 12:47:15
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv7637
Modified Files:
TlsSessionSettings.cs TlsSession.cs TlsReader.cs
Log Message:
Prepare for beta1
Index: TlsSessionSettings.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSessionSettings.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TlsSessionSettings.cs 4 Sep 2003 12:37:04 -0000 1.4
--- TlsSessionSettings.cs 12 Sep 2003 12:47:11 -0000 1.5
***************
*** 32,35 ****
--- 32,36 ----
private TlsProtocol protocol;
private X509CertificateCollection certificates;
+ private bool useBufferedStreams;
#endregion
***************
*** 67,70 ****
--- 68,77 ----
}
+ public bool UseBufferedStreams
+ {
+ get { return useBufferedStreams; }
+ set { useBufferedStreams = value; }
+ }
+
#endregion
***************
*** 73,81 ****
public TlsSessionSettings()
{
! this.protocol = TlsProtocol.Tls1;
! this.certificates = new X509CertificateCollection();
! this.serverName = "localhost";
! this.serverPort = 443;
! this.encoding = Encoding.Default;
}
--- 80,89 ----
public TlsSessionSettings()
{
! this.protocol = TlsProtocol.Tls1;
! this.certificates = new X509CertificateCollection();
! this.serverName = "localhost";
! this.serverPort = 443;
! this.encoding = Encoding.Default;
! this.useBufferedStreams = true;
}
Index: TlsSession.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSession.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** TlsSession.cs 4 Sep 2003 12:34:17 -0000 1.10
--- TlsSession.cs 12 Sep 2003 12:47:11 -0000 1.11
***************
*** 306,311 ****
// Create the reader and the writer
! reader = new TlsReader(this, new BufferedStream(networkStream), settings.Encoding);
! writer = new TlsWriter(this, new BufferedStream(networkStream), settings.Encoding);
}
private void closeStreams()
--- 306,319 ----
// Create the reader and the writer
! if (settings.UseBufferedStreams)
! {
! reader = new TlsReader(this, new BufferedStream(networkStream), settings.Encoding);
! writer = new TlsWriter(this, new BufferedStream(networkStream), settings.Encoding);
! }
! else
! {
! reader = new TlsReader(this, networkStream, settings.Encoding);
! writer = new TlsWriter(this, networkStream, settings.Encoding);
! }
}
private void closeStreams()
Index: TlsReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsReader.cs,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** TlsReader.cs 2 Sep 2003 14:53:26 -0000 1.12
--- TlsReader.cs 12 Sep 2003 12:47:11 -0000 1.13
***************
*** 133,144 ****
else
{
! MemoryStream str = new MemoryStream();
while (session.NetworkStream.DataAvailable)
{
! str.WriteByte(base.ReadByte());
}
! return str.ToArray();
}
}
--- 133,147 ----
else
{
! MemoryStream ms = new MemoryStream();
+ // This will wait until data is readed
+ byte b = base.ReadByte();
+ ms.WriteByte(b);
while (session.NetworkStream.DataAvailable)
{
! ms.WriteByte(base.ReadByte());
}
! return ms.ToArray();
}
}
***************
*** 273,277 ****
else
{
! return base.ReadString();
}
}
--- 276,280 ----
else
{
! return encoding.GetString(this.ReadBytes());
}
}
|
|
From: <car...@us...> - 2003-09-04 12:39:46
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv27014
Modified Files:
TlsWriter.cs
Log Message:
Updated file
Index: TlsWriter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsWriter.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TlsWriter.cs 1 Sep 2003 11:11:08 -0000 1.7
--- TlsWriter.cs 4 Sep 2003 12:39:43 -0000 1.8
***************
*** 197,200 ****
--- 197,201 ----
// Send Change Cipher Spec message
writeRecord(TlsContentType.ChangeCipherSpec, new byte[] {1});
+ Flush();
// Reset sequence numbers
***************
*** 206,209 ****
--- 207,211 ----
// Send Finished message
WriteRecord(TlsHandshakeType.Finished);
+ Flush();
}
***************
*** 238,244 ****
record.Write(fragment);
! // Write record & flush data
base.Write(record.GetBytes());
- Flush();
// Reset record data
--- 240,245 ----
record.Write(fragment);
! // Write record
base.Write(record.GetBytes());
// Reset record data
|
|
From: <car...@us...> - 2003-09-04 12:37:07
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv26475
Modified Files:
TlsSessionSettings.cs
Log Message:
Updated file
Index: TlsSessionSettings.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSessionSettings.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TlsSessionSettings.cs 1 Sep 2003 11:11:08 -0000 1.3
--- TlsSessionSettings.cs 4 Sep 2003 12:37:04 -0000 1.4
***************
*** 40,43 ****
--- 40,44 ----
{
get { return serverName; }
+ set { serverName = value; }
}
***************
*** 45,48 ****
--- 46,50 ----
{
get { return serverPort; }
+ set { serverPort = value; }
}
***************
*** 50,53 ****
--- 52,56 ----
{
get { return encoding; }
+ set { encoding = value; }
}
***************
*** 55,58 ****
--- 58,62 ----
{
get { return protocol; }
+ set { protocol = value; }
}
***************
*** 60,63 ****
--- 64,68 ----
{
get { return certificates; }
+ set { certificates = value; }
}
|
|
From: <car...@us...> - 2003-09-04 12:34:21
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv25812
Modified Files:
TlsSession.cs
Log Message:
Updated file
Index: TlsSession.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSession.cs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** TlsSession.cs 1 Sep 2003 11:11:08 -0000 1.9
--- TlsSession.cs 4 Sep 2003 12:34:17 -0000 1.10
***************
*** 62,70 ****
}
- private TlsSessionSettings Settings
- {
- get { return settings; }
- }
-
internal TlsSessionState State
{
--- 62,65 ----
***************
*** 93,96 ****
--- 88,96 ----
}
+ internal NetworkStream NetworkStream
+ {
+ get { return networkStream; }
+ }
+
#endregion
***************
*** 157,160 ****
--- 157,161 ----
// Send client hello
writer.WriteRecord(TlsHandshakeType.ClientHello);
+ writer.Flush();
// Read server response
***************
*** 173,176 ****
--- 174,178 ----
// Send Client Key Exchange
writer.WriteRecord(TlsHandshakeType.ClientKeyExchange);
+ writer.Flush();
// Now initialize session cipher with the generated keys
***************
*** 184,188 ****
// Send Cipher Spec protocol
! writer.WriteChangeCipherSpec();
// Read Cipher Spec protocol
--- 186,190 ----
// Send Cipher Spec protocol
! writer.WriteChangeCipherSpec();
// Read Cipher Spec protocol
|
|
From: <car...@us...> - 2003-09-02 14:53:33
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv3300
Modified Files:
TlsReader.cs
Log Message:
Minor changes
Index: TlsReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsReader.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** TlsReader.cs 1 Sep 2003 11:56:52 -0000 1.11
--- TlsReader.cs 2 Sep 2003 14:53:26 -0000 1.12
***************
*** 133,137 ****
else
{
! return base.ReadBytes((int)this.BaseStream.Length);
}
}
--- 133,144 ----
else
{
! MemoryStream str = new MemoryStream();
!
! while (session.NetworkStream.DataAvailable)
! {
! str.WriteByte(base.ReadByte());
! }
!
! return str.ToArray();
}
}
|
|
From: <car...@us...> - 2003-09-02 10:35:10
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv26609 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** changelog.txt 22 Aug 2003 19:42:07 -0000 1.21 --- changelog.txt 2 Sep 2003 10:34:18 -0000 1.22 *************** *** 2,5 **** --- 2,10 ---- ------------------------------------------------------- + 2003-09-02 Carlos Guzmán Álvarez <car...@te...> + + * source/NPgClient/PgDbClient.cs: + + - Added changes for better generation of the character set collection. 2003-08-22 Carlos Guzmán Álvarez <car...@te...> |
|
From: <car...@us...> - 2003-09-02 10:33:31
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient
In directory sc8-pr-cvs1:/tmp/cvs-serv26427
Modified Files:
PgDbClient.cs
Log Message:
Added changes for better generation of the character set collection.
Index: PgDbClient.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** PgDbClient.cs 1 Sep 2003 11:56:23 -0000 1.8
--- PgDbClient.cs 2 Sep 2003 10:32:46 -0000 1.9
***************
*** 690,714 ****
charSets = new PgCharSetCollection();
! charSets.Add("SQL_ASCII", "ascii"); // ASCII
try
{
! charSets.Add("EUC_JP" , "euc-jp"); // Japanese EUC
! charSets.Add("EUC_CN" , "euc-cn"); // Chinese EUC
}
catch (Exception)
{
}
- charSets.Add("UNICODE" , "UTF-8"); // Unicode (UTF-8)
- charSets.Add("LATIN1" , "iso-8859-1"); // ISO 8859-1/ECMA 94 (Latin alphabet no.1)
- charSets.Add("LATIN2" , "iso-8859-2"); // ISO 8859-2/ECMA 94 (Latin alphabet no.2)
- charSets.Add("LATIN4" , 1257); // ISO 8859-4/ECMA 94 (Latin alphabet no.4)
- charSets.Add("ISO_8859_7", 1253); // ISO 8859-7/ECMA 118 (Latin/Greek)
- charSets.Add("LATIN9" , "iso-8859-15"); // ISO 8859-15 (Latin alphabet no.9)
- charSets.Add("KOI8" , "koi8-r"); // KOI8-R(U)
- charSets.Add("WIN" , "windows-1251"); // Windows CP1251
- charSets.Add("WIN1256" , "windows-1256"); // Windows CP1256 (Arabic)
- charSets.Add("WIN1256" , "windows-1256"); // Windows CP1256 (Arabic)
- charSets.Add("WIN1256" , "windows-1258"); // TCVN-5712/Windows CP1258 (Vietnamese)
- charSets.Add("WIN1256" , "windows-874"); // Windows CP874 (Thai)
}
--- 690,730 ----
charSets = new PgCharSetCollection();
! PgDbClient.addCharset("SQL_ASCII" , "ascii"); // ASCII
! PgDbClient.addCharset("EUC_JP" , "euc-jp"); // Japanese EUC
! PgDbClient.addCharset("EUC_CN" , "euc-cn"); // Chinese EUC
! PgDbClient.addCharset("UNICODE" , "UTF-8"); // Unicode (UTF-8)
! PgDbClient.addCharset("LATIN1" , "iso-8859-1"); // ISO 8859-1/ECMA 94 (Latin alphabet no.1)
! PgDbClient.addCharset("LATIN2" , "iso-8859-2"); // ISO 8859-2/ECMA 94 (Latin alphabet no.2)
! PgDbClient.addCharset("LATIN4" , 1257); // ISO 8859-4/ECMA 94 (Latin alphabet no.4)
! PgDbClient.addCharset("ISO_8859_7" , 1253); // ISO 8859-7/ECMA 118 (Latin/Greek)
! PgDbClient.addCharset("LATIN9" , "iso-8859-15"); // ISO 8859-15 (Latin alphabet no.9)
! PgDbClient.addCharset("KOI8" , "koi8-r"); // KOI8-R(U)
! PgDbClient.addCharset("WIN" , "windows-1251"); // Windows CP1251
! PgDbClient.addCharset("WIN1256" , "windows-1256"); // Windows CP1256 (Arabic)
! PgDbClient.addCharset("WIN1256" , "windows-1256"); // Windows CP1256 (Arabic)
! PgDbClient.addCharset("WIN1256" , "windows-1258"); // TCVN-5712/Windows CP1258 (Vietnamese)
! PgDbClient.addCharset("WIN1256" , "windows-874"); // Windows CP874 (Thai)
! }
!
! private static void addCharset(string charset, string systemCharset)
! {
try
{
! charSets.Add(charset, systemCharset);
! }
! catch (Exception)
! {
! }
! }
!
! private static void addCharset(string charset, int cp)
! {
! try
! {
! charSets.Add(charset, cp);
}
catch (Exception)
{
}
}
|
|
From: <car...@us...> - 2003-09-01 11:56:57
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv30270
Modified Files:
TlsReader.cs
Log Message:
- Changed namespace name to a more standard name.
- Changed the way for use TLS readers and writers, now the TlsSession class
handles the socket used for connect to a server.
- Improvements to TlsWriter class for better handling of application data records.
Index: TlsReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsReader.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** TlsReader.cs 1 Sep 2003 11:11:08 -0000 1.10
--- TlsReader.cs 1 Sep 2003 11:56:52 -0000 1.11
***************
*** 32,35 ****
--- 32,36 ----
private TlsSession session;
+ private Encoding encoding;
#endregion
***************
*** 48,52 ****
internal TlsReader(TlsSession session, Stream input, Encoding encoding) : base(input, encoding)
{
! this.session = session;
}
--- 49,54 ----
internal TlsReader(TlsSession session, Stream input, Encoding encoding) : base(input, encoding)
{
! this.session = session;
! this.encoding = encoding;
}
***************
*** 55,59 ****
#region TLS_METHODS
! public byte[] ReadRecord()
{
if (session.State.ConnectionEnd)
--- 57,317 ----
#region TLS_METHODS
! public override int Read()
! {
! if (session.IsSecure)
! {
! byte[] buffer = this.ReadRecord();
!
! return buffer.Length;
! }
! else
! {
! return base.Read();
! }
! }
!
! public override int Read(byte[] buffer, int index, int count)
! {
! if (session.IsSecure)
! {
! byte[] bytes = this.ReadRecord();
! System.Array.Copy(bytes, 0, buffer, index, count);
!
! return count;
! }
! else
! {
! return base.Read(buffer, index, count);
! }
! }
!
! public override int Read(char[] buffer, int index, int count)
! {
! if (session.IsSecure)
! {
! byte[] bytes = this.ReadRecord();
! encoding.GetChars(bytes, 0, count, buffer, index);
!
! return count;
! }
! else
! {
! return base.Read(buffer, index, count);
! }
! }
!
! public override bool ReadBoolean()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToBoolean(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadBoolean();
! }
! }
!
! public override byte ReadByte()
! {
! if (session.IsSecure)
! {
! return this.ReadRecord()[0];
! }
! else
! {
! return base.ReadByte();
! }
! }
!
! public byte[] ReadBytes()
! {
! if (session.IsSecure)
! {
! return this.ReadRecord();
! }
! else
! {
! return base.ReadBytes((int)this.BaseStream.Length);
! }
! }
!
! public override byte[] ReadBytes(int count)
! {
! if (session.IsSecure)
! {
! return this.ReadRecord();
! }
! else
! {
! return base.ReadBytes(count);
! }
! }
!
! public override char ReadChar()
! {
! if (session.IsSecure)
! {
! return (char)this.ReadRecord()[0];
! }
! else
! {
! return base.ReadChar();
! }
! }
!
! public override char[] ReadChars(int count)
! {
! if (session.IsSecure)
! {
! return encoding.GetChars(this.ReadRecord());
! }
! else
! {
! return base.ReadChars(count);
! }
! }
!
! public override decimal ReadDecimal()
! {
! if (session.IsSecure)
! {
! throw new NotSupportedException("ReadDecimal() method can be used with a secure connection.");
! }
! else
! {
! return base.ReadDecimal();
! }
! }
!
! public override double ReadDouble()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToDouble(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadDouble();
! }
! }
!
! public override short ReadInt16()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToInt16(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadInt16();
! }
! }
!
! public override int ReadInt32()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToInt32(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadInt32();
! }
! }
!
! public override long ReadInt64()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToInt64(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadInt64();
! }
! }
!
! [CLSCompliant(false)]
! public override sbyte ReadSByte()
! {
! if (session.IsSecure)
! {
! return (sbyte)this.ReadRecord()[0];
! }
! else
! {
! return base.ReadSByte();
! }
! }
!
! public override float ReadSingle()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToSingle(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadSingle();
! }
! }
!
! public override string ReadString()
! {
! if (session.IsSecure)
! {
! return encoding.GetString(this.ReadRecord());
! }
! else
! {
! return base.ReadString();
! }
! }
!
! [CLSCompliant(false)]
! public override ushort ReadUInt16()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToUInt16(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadUInt16();
! }
! }
!
! [CLSCompliant(false)]
! public override uint ReadUInt32()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToUInt32(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadUInt32();
! }
! }
!
! [CLSCompliant(false)]
! public override ulong ReadUInt64()
! {
! if (session.IsSecure)
! {
! return BitConverter.ToUInt64(this.ReadRecord(), 0);
! }
! else
! {
! return base.ReadUInt64();
! }
! }
!
! #endregion
!
! #region INTERNAL_METHODS
!
! internal byte[] ReadRecord()
{
if (session.State.ConnectionEnd)
***************
*** 64,72 ****
byte[] result = null;
! TlsContentType contentType = (TlsContentType)this.ReadByte();
TlsProtocol protocol = (TlsProtocol)this.ReadShort();
int length = this.ReadShort();
! byte[] message = ReadBytes(length);
// Check that the message as a valid protocol version
--- 322,330 ----
byte[] result = null;
! TlsContentType contentType = (TlsContentType)base.ReadByte();
TlsProtocol protocol = (TlsProtocol)this.ReadShort();
int length = this.ReadShort();
! byte[] message = base.ReadBytes(length);
// Check that the message as a valid protocol version
***************
*** 117,124 ****
return result;
}
-
- #endregion
-
- #region INTERNAL_METHODS
internal short ReadShort()
--- 375,378 ----
|
|
From: <car...@us...> - 2003-09-01 11:56:27
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient
In directory sc8-pr-cvs1:/tmp/cvs-serv30234
Modified Files:
PgDbClient.cs
Log Message:
Removed socket and networkStream fields that now are handled by the
TLS implementation.
Index: PgDbClient.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** PgDbClient.cs 1 Sep 2003 11:13:25 -0000 1.7
--- PgDbClient.cs 1 Sep 2003 11:56:23 -0000 1.8
***************
*** 243,247 ****
{
// TLS/SSL Application data contents
! PgResponsePacket tmpPacket = new PgResponsePacket(receive.ReadRecord());
type = tmpPacket.ReadChar();
--- 243,247 ----
{
// TLS/SSL Application data contents
! PgResponsePacket tmpPacket = new PgResponsePacket(receive.ReadBytes());
type = tmpPacket.ReadChar();
|
|
From: <car...@us...> - 2003-09-01 11:13:28
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient
In directory sc8-pr-cvs1:/tmp/cvs-serv24269
Modified Files:
PgDbClient.cs
Log Message:
Removed socket and networkStream fields that now are handled by the
TLS implementation.
Index: PgDbClient.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** PgDbClient.cs 22 Aug 2003 15:53:31 -0000 1.6
--- PgDbClient.cs 1 Sep 2003 11:13:25 -0000 1.7
***************
*** 25,30 ****
using System.Text;
! using PgSqlClient.Security.TLS;
! using PgSqlClient.Security.TLS.Alerts;
namespace PostgreSql.Data.NPgClient
--- 25,30 ----
using System.Text;
! using System.Security.Tls;
! using System.Security.Tls.Alerts;
namespace PostgreSql.Data.NPgClient
***************
*** 51,56 ****
private int secretKey;
private Hashtable parameterStatus;
- private Socket socket;
- private NetworkStream networkStream;
private TlsWriter send;
private TlsReader receive;
--- 51,54 ----
***************
*** 97,105 ****
}
- public Socket Socket
- {
- get { return socket; }
- }
-
public TlsReader Receive
{
--- 95,98 ----
***************
*** 145,151 ****
lock (this)
{
! session = new TlsSession(new TlsSessionSettings(TlsProtocol.Tls1));
!
! initializeSocket();
if (settings.SSL)
--- 138,145 ----
lock (this)
{
! TlsSessionSettings tlsSettings = new TlsSessionSettings(TlsProtocol.Tls1, settings.ServerName, settings.ServerPort);
! session = new TlsSession(tlsSettings);
! send = session.GetWriter();
! receive = session.GetReader();
if (settings.SSL)
***************
*** 164,171 ****
{
// If the exception is fatal close connection
! if (ex.AlertLevel == TlsAlertLevel.Fatal)
! {
! this.Detach();
! }
throw new PgClientException(ex.Message);
}
--- 158,163 ----
{
// If the exception is fatal close connection
! session.EndSession();
!
throw new PgClientException(ex.Message);
}
***************
*** 200,204 ****
catch (PgClientException ex)
{
! this.Detach();
throw ex;
}
--- 192,196 ----
catch (PgClientException ex)
{
! session.EndSession();
throw ex;
}
***************
*** 213,224 ****
SendData(packet.GetPacketBytes(PgFrontEndCodes.TERMINATE));
! // if it's an SSL connection end session
! if (settings.SSL)
! {
! session.EndSession();
! }
!
! // Close socket and streams
! this.Detach();
}
catch (PgClientException ex)
--- 205,210 ----
SendData(packet.GetPacketBytes(PgFrontEndCodes.TERMINATE));
! // End session
! session.EndSession();
}
catch (PgClientException ex)
***************
*** 228,250 ****
}
- public void Detach()
- {
- // Close socket and streams
- receive.Close();
- send.Close();
- socket.Close();
- }
-
internal void SendData(byte[] data)
{
! if (settings.SSL)
! {
! send.WriteRecord(data);
! }
! else
! {
! send.Write(data);
! }
!
send.Flush();
}
--- 214,220 ----
}
internal void SendData(byte[] data)
{
! send.Write(data);
send.Flush();
}
***************
*** 773,798 ****
{
return new PgStatement(this, parseName, portalName, stmtText);
- }
-
- #endregion
-
- #region PRIVATE_METHODS
-
- private void initializeSocket()
- {
- IPAddress hostadd = Dns.Resolve(settings.ServerName).AddressList[0];
- IPEndPoint EPhost = new IPEndPoint(hostadd, settings.ServerPort);
-
- socket = new Socket(AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.IP);
-
- // Make the socket to connect to the Server
- socket.Connect(EPhost);
- networkStream = new NetworkStream(socket, true);
-
- // Create streams for read/write operations
- send = session.GetWriter(networkStream);
- receive = session.GetReader(networkStream);
}
--- 743,746 ----
|
|
From: <car...@us...> - 2003-09-01 11:11:57
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Alerts
In directory sc8-pr-cvs1:/tmp/cvs-serv24084
Modified Files:
TlsWarningAlertEventArgs.cs
Log Message:
Make public classes to be sealed
Index: TlsWarningAlertEventArgs.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Alerts/TlsWarningAlertEventArgs.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TlsWarningAlertEventArgs.cs 1 Sep 2003 10:22:05 -0000 1.3
--- TlsWarningAlertEventArgs.cs 1 Sep 2003 11:11:54 -0000 1.4
***************
*** 23,27 ****
public delegate void TlsWarningAlertEventHandler(object sender, TlsWarningAlertEventArgs e);
! public class TlsWarningAlertEventArgs
{
#region FIELDS
--- 23,27 ----
public delegate void TlsWarningAlertEventHandler(object sender, TlsWarningAlertEventArgs e);
! public sealed class TlsWarningAlertEventArgs
{
#region FIELDS
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv23984
Modified Files:
TlsException.cs TlsReader.cs TlsSession.cs
TlsSessionSettings.cs TlsWriter.cs
Log Message:
Make public classes to be sealed
Index: TlsException.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsException.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsException.cs 1 Sep 2003 10:19:44 -0000 1.2
--- TlsException.cs 1 Sep 2003 11:11:08 -0000 1.3
***************
*** 26,30 ****
{
[Serializable]
! public class TlsException : Exception
{
#region FIELDS
--- 26,30 ----
{
[Serializable]
! public sealed class TlsException : Exception
{
#region FIELDS
Index: TlsReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsReader.cs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** TlsReader.cs 1 Sep 2003 10:19:44 -0000 1.9
--- TlsReader.cs 1 Sep 2003 11:11:08 -0000 1.10
***************
*** 27,31 ****
namespace System.Security.Tls
{
! public class TlsReader : BinaryReader
{
#region FIELDS
--- 27,31 ----
namespace System.Security.Tls
{
! public sealed class TlsReader : BinaryReader
{
#region FIELDS
Index: TlsSession.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSession.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TlsSession.cs 1 Sep 2003 10:19:44 -0000 1.8
--- TlsSession.cs 1 Sep 2003 11:11:08 -0000 1.9
***************
*** 31,35 ****
namespace System.Security.Tls
{
! public class TlsSession
{
#region EVENTS
--- 31,35 ----
namespace System.Security.Tls
{
! public sealed class TlsSession
{
#region EVENTS
Index: TlsSessionSettings.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSessionSettings.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsSessionSettings.cs 1 Sep 2003 10:19:44 -0000 1.2
--- TlsSessionSettings.cs 1 Sep 2003 11:11:08 -0000 1.3
***************
*** 23,27 ****
namespace System.Security.Tls
{
! public class TlsSessionSettings
{
#region FIELDS
--- 23,27 ----
namespace System.Security.Tls
{
! public sealed class TlsSessionSettings
{
#region FIELDS
Index: TlsWriter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsWriter.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TlsWriter.cs 1 Sep 2003 10:19:44 -0000 1.6
--- TlsWriter.cs 1 Sep 2003 11:11:08 -0000 1.7
***************
*** 29,33 ****
namespace System.Security.Tls
{
! public class TlsWriter : BinaryWriter
{
#region FIELDS
--- 29,33 ----
namespace System.Security.Tls
{
! public sealed class TlsWriter : BinaryWriter
{
#region FIELDS
|
|
From: <car...@us...> - 2003-09-01 10:22:15
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Alerts
In directory sc8-pr-cvs1:/tmp/cvs-serv16379
Modified Files:
TlsAlert.cs TlsCloseNotifyAlert.cs TlsWarningAlertEventArgs.cs
Log Message:
- Changed namespace name to a more standard name.
- Changed the way for use TLS readers and writers, now the TlsSession class
handles the socket used for connect to a server.
- Improvements to TlsWriter class for better handling of application data records.
Index: TlsAlert.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Alerts/TlsAlert.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsAlert.cs 25 Aug 2003 10:22:36 -0000 1.2
--- TlsAlert.cs 1 Sep 2003 10:22:05 -0000 1.3
***************
*** 19,25 ****
using System;
! using PgSqlClient.Security.TLS;
! namespace PgSqlClient.Security.TLS.Alerts
{
#region ENUMS
--- 19,25 ----
using System;
! using System.Security.Tls;
! namespace System.Security.Tls.Alerts
{
#region ENUMS
Index: TlsCloseNotifyAlert.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Alerts/TlsCloseNotifyAlert.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsCloseNotifyAlert.cs 25 Aug 2003 10:22:36 -0000 1.2
--- TlsCloseNotifyAlert.cs 1 Sep 2003 10:22:05 -0000 1.3
***************
*** 19,25 ****
using System;
! using PgSqlClient.Security.TLS;
! namespace PgSqlClient.Security.TLS.Alerts
{
internal class TlsCloseNotifyAlert : TlsAlert
--- 19,25 ----
using System;
! using System.Security.Tls;
! namespace System.Security.Tls.Alerts
{
internal class TlsCloseNotifyAlert : TlsAlert
Index: TlsWarningAlertEventArgs.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Alerts/TlsWarningAlertEventArgs.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsWarningAlertEventArgs.cs 25 Aug 2003 10:22:36 -0000 1.2
--- TlsWarningAlertEventArgs.cs 1 Sep 2003 10:22:05 -0000 1.3
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS.Alerts
{
public delegate void TlsWarningAlertEventHandler(object sender, TlsWarningAlertEventArgs e);
--- 19,23 ----
using System;
! namespace System.Security.Tls.Alerts
{
public delegate void TlsWarningAlertEventHandler(object sender, TlsWarningAlertEventArgs e);
|
|
From: <car...@us...> - 2003-09-01 10:21:40
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Cryptography
In directory sc8-pr-cvs1:/tmp/cvs-serv16290
Modified Files:
HMAC.cs
Log Message:
- Changed namespace name to a more standard name.
- Changed the way for use TLS readers and writers, now the TlsSession class
handles the socket used for connect to a server.
- Improvements to TlsWriter class for better handling of application data records.
Index: HMAC.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Cryptography/HMAC.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HMAC.cs 24 Aug 2003 21:09:26 -0000 1.1
--- HMAC.cs 1 Sep 2003 10:21:37 -0000 1.2
***************
*** 20,24 ****
using System.Security.Cryptography;
! namespace PgSqlClient.Security.TLS.Cryptography
{
/*
--- 20,24 ----
using System.Security.Cryptography;
! namespace System.Security.Tls.Cryptography
{
/*
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake
In directory sc8-pr-cvs1:/tmp/cvs-serv16228
Modified Files:
TlsClientCertificateType.cs TlsClientFinished.cs
TlsClientHandshakeMessage.cs TlsClientHello.cs
TlsClientKeyExchange.cs TlsHandshakeHashes.cs
TlsHandshakeType.cs TlsServerCertificate.cs
TlsServerCertificateRequest.cs TlsServerFinished.cs
TlsServerHandshakeMessage.cs TlsServerHello.cs
TlsServerHelloDone.cs TlsServerKeyExchange.cs
Log Message:
- Changed namespace name to a more standard name.
- Changed the way for use TLS readers and writers, now the TlsSession class
handles the socket used for connect to a server.
- Improvements to TlsWriter class for better handling of application data records.
Index: TlsClientCertificateType.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientCertificateType.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsClientCertificateType.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsClientCertificateType.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS.Handshake
{
public enum TlsClientCertificateType
--- 19,23 ----
using System;
! namespace System.Security.Tls.Handshake
{
public enum TlsClientCertificateType
Index: TlsClientFinished.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientFinished.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsClientFinished.cs 25 Aug 2003 16:41:02 -0000 1.2
--- TlsClientFinished.cs 1 Sep 2003 10:21:20 -0000 1.3
***************
*** 20,24 ****
using System.Security.Cryptography;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsClientFinished : TlsClientHandshakeMessage
--- 20,24 ----
using System.Security.Cryptography;
! namespace System.Security.Tls.Handshake
{
internal class TlsClientFinished : TlsClientHandshakeMessage
Index: TlsClientHandshakeMessage.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientHandshakeMessage.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsClientHandshakeMessage.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsClientHandshakeMessage.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 20,24 ****
using System.IO;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal abstract class TlsClientHandshakeMessage : TlsStreamWriter
--- 20,24 ----
using System.IO;
! namespace System.Security.Tls.Handshake
{
internal abstract class TlsClientHandshakeMessage : TlsStreamWriter
Index: TlsClientHello.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientHello.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsClientHello.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsClientHello.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 20,24 ****
using System.Security.Cryptography;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsClientHello : TlsClientHandshakeMessage
--- 20,24 ----
using System.Security.Cryptography;
! namespace System.Security.Tls.Handshake
{
internal class TlsClientHello : TlsClientHandshakeMessage
Index: TlsClientKeyExchange.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientKeyExchange.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TlsClientKeyExchange.cs 25 Aug 2003 16:41:02 -0000 1.3
--- TlsClientKeyExchange.cs 1 Sep 2003 10:21:20 -0000 1.4
***************
*** 21,25 ****
using System.Security.Cryptography;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsClientKeyExchange : TlsClientHandshakeMessage
--- 21,25 ----
using System.Security.Cryptography;
! namespace System.Security.Tls.Handshake
{
internal class TlsClientKeyExchange : TlsClientHandshakeMessage
Index: TlsHandshakeHashes.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsHandshakeHashes.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsHandshakeHashes.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsHandshakeHashes.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 20,24 ****
using System.Security.Cryptography;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsHandshakeHashes
--- 20,24 ----
using System.Security.Cryptography;
! namespace System.Security.Tls.Handshake
{
internal class TlsHandshakeHashes
Index: TlsHandshakeType.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsHandshakeType.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsHandshakeType.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsHandshakeType.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal enum TlsHandshakeType : byte
--- 19,23 ----
using System;
! namespace System.Security.Tls.Handshake
{
internal enum TlsHandshakeType : byte
Index: TlsServerCertificate.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerCertificate.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsServerCertificate.cs 29 Aug 2003 23:55:54 -0000 1.2
--- TlsServerCertificate.cs 1 Sep 2003 10:21:20 -0000 1.3
***************
*** 21,27 ****
using System.Security.Cryptography.X509Certificates;
! using PgSqlClient.Security.TLS.Alerts;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsServerCertificate : TlsServerHandshakeMessage
--- 21,27 ----
using System.Security.Cryptography.X509Certificates;
! using System.Security.Tls.Alerts;
! namespace System.Security.Tls.Handshake
{
internal class TlsServerCertificate : TlsServerHandshakeMessage
Index: TlsServerCertificateRequest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerCertificateRequest.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerCertificateRequest.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsServerCertificateRequest.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsServerCertificateRequest : TlsServerHandshakeMessage
--- 19,23 ----
using System;
! namespace System.Security.Tls.Handshake
{
internal class TlsServerCertificateRequest : TlsServerHandshakeMessage
Index: TlsServerFinished.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerFinished.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsServerFinished.cs 25 Aug 2003 16:41:02 -0000 1.2
--- TlsServerFinished.cs 1 Sep 2003 10:21:20 -0000 1.3
***************
*** 20,24 ****
using System.Security.Cryptography;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsServerFinished : TlsServerHandshakeMessage
--- 20,24 ----
using System.Security.Cryptography;
! namespace System.Security.Tls.Handshake
{
internal class TlsServerFinished : TlsServerHandshakeMessage
Index: TlsServerHandshakeMessage.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerHandshakeMessage.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerHandshakeMessage.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsServerHandshakeMessage.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal abstract class TlsServerHandshakeMessage : TlsStreamReader
--- 19,23 ----
using System;
! namespace System.Security.Tls.Handshake
{
internal abstract class TlsServerHandshakeMessage : TlsStreamReader
Index: TlsServerHello.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerHello.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerHello.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsServerHello.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsServerHello : TlsServerHandshakeMessage
--- 19,23 ----
using System;
! namespace System.Security.Tls.Handshake
{
internal class TlsServerHello : TlsServerHandshakeMessage
Index: TlsServerHelloDone.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerHelloDone.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerHelloDone.cs 20 Aug 2003 11:51:31 -0000 1.1
--- TlsServerHelloDone.cs 1 Sep 2003 10:21:20 -0000 1.2
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsServerHelloDone : TlsServerHandshakeMessage
--- 19,23 ----
using System;
! namespace System.Security.Tls.Handshake
{
internal class TlsServerHelloDone : TlsServerHandshakeMessage
Index: TlsServerKeyExchange.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerKeyExchange.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TlsServerKeyExchange.cs 29 Aug 2003 23:56:58 -0000 1.2
--- TlsServerKeyExchange.cs 1 Sep 2003 10:21:20 -0000 1.3
***************
*** 21,25 ****
! namespace PgSqlClient.Security.TLS.Handshake
{
internal class TlsServerKeyExchange : TlsServerHandshakeMessage
--- 21,25 ----
! namespace System.Security.Tls.Handshake
{
internal class TlsServerKeyExchange : TlsServerHandshakeMessage
|
|
From: <car...@us...> - 2003-09-01 10:20:58
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source In directory sc8-pr-cvs1:/tmp/cvs-serv16119 Added Files: System.Security.Tls.snk Log Message: Renamed .snk file --- NEW FILE: System.Security.Tls.snk --- (This appears to be a binary file; contents omitted.) |
|
From: <car...@us...> - 2003-09-01 10:20:20
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source In directory sc8-pr-cvs1:/tmp/cvs-serv16027 Removed Files: PgSqlClient.Security.Tls.snk Log Message: Removed file --- PgSqlClient.Security.Tls.snk DELETED --- |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source
In directory sc8-pr-cvs1:/tmp/cvs-serv15825
Modified Files:
AssemblyInfo.cs TlsCipherSuite.cs TlsCipherSuiteCollection.cs
TlsContentType.cs TlsException.cs TlsProtocol.cs TlsReader.cs
TlsServerSettings.cs TlsSession.cs TlsSessionSettings.cs
TlsSessionState.cs TlsStreamReader.cs TlsStreamWriter.cs
TlsWriter.cs
Log Message:
- Changed namespace name to a more standard name.
- Changed the way for use TLS readers and writers, now the TlsSession class
handles the socket used for connect to a server.
- Improvements to TlsWriter class for better handling of application data records.
Index: AssemblyInfo.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/AssemblyInfo.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AssemblyInfo.cs 20 Aug 2003 11:48:20 -0000 1.1
--- AssemblyInfo.cs 1 Sep 2003 10:19:44 -0000 1.2
***************
*** 32,36 ****
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
! [assembly: AssemblyKeyFile("PgSqlClient.Security.Tls.snk")]
[assembly: AssemblyKeyName("")]
[assembly: CLSCompliant(true)]
--- 32,36 ----
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
! [assembly: AssemblyKeyFile("System.Security.Tls.snk")]
[assembly: AssemblyKeyName("")]
[assembly: CLSCompliant(true)]
Index: TlsCipherSuite.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsCipherSuite.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TlsCipherSuite.cs 29 Aug 2003 23:54:35 -0000 1.6
--- TlsCipherSuite.cs 1 Sep 2003 10:19:44 -0000 1.7
***************
*** 25,31 ****
using Mono.Security;
using Mono.Security.Cryptography;
! using PgSqlClient.Security.TLS.Cryptography;
! namespace PgSqlClient.Security.TLS
{
internal class TlsCipherSuite
--- 25,31 ----
using Mono.Security;
using Mono.Security.Cryptography;
! using System.Security.Tls.Cryptography;
! namespace System.Security.Tls
{
internal class TlsCipherSuite
Index: TlsCipherSuiteCollection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsCipherSuiteCollection.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TlsCipherSuiteCollection.cs 29 Aug 2003 23:54:35 -0000 1.6
--- TlsCipherSuiteCollection.cs 1 Sep 2003 10:19:44 -0000 1.7
***************
*** 22,26 ****
using System.Security.Cryptography;
! namespace PgSqlClient.Security.TLS
{
internal sealed class TlsCipherSuiteCollection : ArrayList
--- 22,26 ----
using System.Security.Cryptography;
! namespace System.Security.Tls
{
internal sealed class TlsCipherSuiteCollection : ArrayList
Index: TlsContentType.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsContentType.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsContentType.cs 20 Aug 2003 11:48:20 -0000 1.1
--- TlsContentType.cs 1 Sep 2003 10:19:44 -0000 1.2
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS
{
internal enum TlsContentType : byte
--- 19,23 ----
using System;
! namespace System.Security.Tls
{
internal enum TlsContentType : byte
Index: TlsException.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsException.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsException.cs 20 Aug 2003 11:48:20 -0000 1.1
--- TlsException.cs 1 Sep 2003 10:19:44 -0000 1.2
***************
*** 21,27 ****
using System.Runtime.Serialization;
! using PgSqlClient.Security.TLS.Alerts;
! namespace PgSqlClient.Security.TLS
{
[Serializable]
--- 21,27 ----
using System.Runtime.Serialization;
! using System.Security.Tls.Alerts;
! namespace System.Security.Tls
{
[Serializable]
Index: TlsProtocol.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsProtocol.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsProtocol.cs 20 Aug 2003 11:48:20 -0000 1.1
--- TlsProtocol.cs 1 Sep 2003 10:19:44 -0000 1.2
***************
*** 19,23 ****
using System;
! namespace PgSqlClient.Security.TLS
{
public enum TlsProtocol : short
--- 19,23 ----
using System;
! namespace System.Security.Tls
{
public enum TlsProtocol : short
Index: TlsReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsReader.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TlsReader.cs 30 Aug 2003 11:11:28 -0000 1.8
--- TlsReader.cs 1 Sep 2003 10:19:44 -0000 1.9
***************
*** 22,29 ****
using System.Security.Cryptography;
! using PgSqlClient.Security.TLS.Alerts;
! using PgSqlClient.Security.TLS.Handshake;
! namespace PgSqlClient.Security.TLS
{
public class TlsReader : BinaryReader
--- 22,29 ----
using System.Security.Cryptography;
! using System.Security.Tls.Alerts;
! using System.Security.Tls.Handshake;
! namespace System.Security.Tls
{
public class TlsReader : BinaryReader
***************
*** 57,60 ****
--- 57,65 ----
public byte[] ReadRecord()
{
+ if (session.State.ConnectionEnd)
+ {
+ session.ThrowException("The session is finished and it's no longer valid.");
+ }
+
byte[] result = null;
***************
*** 68,72 ****
if (protocol != TlsProtocol.Tls1)
{
! throw new TlsException("Invalid protocol version on message received from server");
}
--- 73,77 ----
if (protocol != TlsProtocol.Tls1)
{
! session.ThrowException("Invalid protocol version on message received from server");
}
***************
*** 106,110 ****
default:
! throw new TlsException("Unknown record received from server.");
}
--- 111,116 ----
default:
! session.ThrowException("Unknown record received from server.");
! break;
}
Index: TlsServerSettings.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsServerSettings.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerSettings.cs 20 Aug 2003 11:48:20 -0000 1.1
--- TlsServerSettings.cs 1 Sep 2003 10:19:44 -0000 1.2
***************
*** 21,27 ****
using System.Security.Cryptography.X509Certificates;
! using PgSqlClient.Security.TLS.Handshake;
! namespace PgSqlClient.Security.TLS
{
internal class TlsServerSettings
--- 21,27 ----
using System.Security.Cryptography.X509Certificates;
! using System.Security.Tls.Handshake;
! namespace System.Security.Tls
{
internal class TlsServerSettings
Index: TlsSession.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSession.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TlsSession.cs 29 Aug 2003 23:54:35 -0000 1.7
--- TlsSession.cs 1 Sep 2003 10:19:44 -0000 1.8
***************
*** 21,31 ****
using System.Collections;
using System.Text;
using System.Security.Cryptography;
! using PgSqlClient.Security.TLS.Cryptography;
! using PgSqlClient.Security.TLS.Alerts;
! using PgSqlClient.Security.TLS.Handshake;
! namespace PgSqlClient.Security.TLS
{
public class TlsSession
--- 21,33 ----
using System.Collections;
using System.Text;
+ using System.Net;
+ using System.Net.Sockets;
using System.Security.Cryptography;
! using System.Security.Tls.Cryptography;
! using System.Security.Tls.Alerts;
! using System.Security.Tls.Handshake;
! namespace System.Security.Tls
{
public class TlsSession
***************
*** 47,50 ****
--- 49,55 ----
private TlsWriter writer;
private TlsReader reader;
+ private Socket socket;
+ private NetworkStream networkStream;
+ private bool isSecure;
#endregion
***************
*** 83,86 ****
--- 88,96 ----
}
+ internal bool IsSecure
+ {
+ get { return isSecure; }
+ }
+
#endregion
***************
*** 94,97 ****
--- 104,110 ----
this.handshakeHashes = new TlsHandshakeHashes();
this.sessionId = new byte[0];
+
+ // Initialize socket for connection
+ initializeSocket();
}
***************
*** 127,180 ****
#region METHODS
! public TlsWriter GetWriter(Stream output)
! {
! return GetWriter(output, Encoding.Default);
! }
!
! public TlsWriter GetWriter(Stream output, Encoding encoding)
! {
! writer = new TlsWriter(this, output, encoding);
!
! return writer;
! }
!
! public TlsReader GetReader(Stream input)
! {
! return GetReader(input, Encoding.Default);
! }
!
! public TlsReader GetReader(Stream input, Encoding encoding)
! {
! reader = new TlsReader(this, input, encoding);
!
! return reader;
! }
!
! public TlsWriter GetBufferedWriter(Stream output)
! {
! return GetWriter(output, Encoding.Default);
! }
!
! public TlsWriter GetBufferedWriter(Stream output, Encoding encoding)
{
- writer = new TlsWriter(this, new BufferedStream(output), encoding);
-
return writer;
}
! public TlsReader GetBufferedReader(Stream input)
! {
! return GetReader(input, Encoding.Default);
! }
!
! public TlsReader GetBufferedReader(Stream input, Encoding encoding)
{
! reader = new TlsReader(this, new BufferedStream(input), encoding);
!
! return reader;
}
public void StartSession()
{
// Send client hello
writer.WriteRecord(TlsHandshakeType.ClientHello);
--- 140,158 ----
#region METHODS
! public TlsWriter GetWriter()
{
return writer;
}
! public TlsReader GetReader()
{
! return reader;
}
public void StartSession()
{
+ // Reset isSecure field
+ isSecure = false;
+
// Send client hello
writer.WriteRecord(TlsHandshakeType.ClientHello);
***************
*** 216,227 ****
// Clear Key Info
state.ClearKeyInfo();
}
public void EndSession()
{
! TlsCloseNotifyAlert alert = new TlsCloseNotifyAlert(this);
! // Write close notify
! writer.WriteAlert(alert);
// Close streams
--- 194,211 ----
// Clear Key Info
state.ClearKeyInfo();
+
+ // Set isSecure
+ isSecure = true;
}
public void EndSession()
{
! if (isSecure)
! {
! TlsCloseNotifyAlert alert = new TlsCloseNotifyAlert(this);
! // Write close notify
! writer.WriteAlert(alert);
! }
// Close streams
***************
*** 305,308 ****
--- 289,310 ----
#region PRIVATE_METHODS
+ private void initializeSocket()
+ {
+ // Initialize socket
+ IPAddress hostadd = Dns.Resolve(settings.ServerName).AddressList[0];
+ IPEndPoint EPhost = new IPEndPoint(hostadd, settings.ServerPort);
+
+ socket = new Socket(AddressFamily.InterNetwork,
+ SocketType.Stream,
+ ProtocolType.IP);
+
+ // Make the socket to connect to the Server
+ socket.Connect(EPhost);
+ networkStream = new NetworkStream(socket, true);
+
+ // Create the reader and the writer
+ reader = new TlsReader(this, new BufferedStream(networkStream), settings.Encoding);
+ writer = new TlsWriter(this, new BufferedStream(networkStream), settings.Encoding);
+ }
private void closeStreams()
{
***************
*** 314,317 ****
--- 316,323 ----
reader.Close();
writer.Close();
+
+ // Close the socket and the networkStream
+ socket.Close();
+ networkStream.Close();
}
Index: TlsSessionSettings.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSessionSettings.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsSessionSettings.cs 20 Aug 2003 11:48:20 -0000 1.1
--- TlsSessionSettings.cs 1 Sep 2003 10:19:44 -0000 1.2
***************
*** 18,24 ****
using System;
using System.Security.Cryptography.X509Certificates;
! namespace PgSqlClient.Security.TLS
{
public class TlsSessionSettings
--- 18,25 ----
using System;
+ using System.Text;
using System.Security.Cryptography.X509Certificates;
! namespace System.Security.Tls
{
public class TlsSessionSettings
***************
*** 26,40 ****
#region FIELDS
private TlsProtocol protocol;
private X509CertificateCollection certificates;
!
#endregion
#region PROPERTIES
public TlsProtocol Protocol
{
get { return protocol; }
- set { protocol = value; }
}
--- 27,58 ----
#region FIELDS
+ private string serverName;
+ private int serverPort;
+ private Encoding encoding;
private TlsProtocol protocol;
private X509CertificateCollection certificates;
!
#endregion
#region PROPERTIES
+ public string ServerName
+ {
+ get { return serverName; }
+ }
+
+ public int ServerPort
+ {
+ get { return serverPort; }
+ }
+
+ public Encoding Encoding
+ {
+ get { return encoding; }
+ }
+
public TlsProtocol Protocol
{
get { return protocol; }
}
***************
*** 42,46 ****
{
get { return certificates; }
- set { certificates = value; }
}
--- 60,63 ----
***************
*** 53,64 ****
this.protocol = TlsProtocol.Tls1;
this.certificates = new X509CertificateCollection();
}
public TlsSessionSettings(TlsProtocol protocol) : this()
{
! this.protocol = protocol;
}
! public TlsSessionSettings(TlsProtocol protocol, X509CertificateCollection certificates) : this()
{
this.protocol = protocol;
--- 70,143 ----
this.protocol = TlsProtocol.Tls1;
this.certificates = new X509CertificateCollection();
+ this.serverName = "localhost";
+ this.serverPort = 443;
+ this.encoding = Encoding.Default;
}
public TlsSessionSettings(TlsProtocol protocol) : this()
{
! this.protocol = protocol;
}
! public TlsSessionSettings(TlsProtocol protocol, Encoding encoding) : this()
! {
! this.protocol = protocol;
! this.encoding = encoding;
! }
!
! public TlsSessionSettings(string serverName) : this()
! {
! this.serverName = serverName;
! }
!
! public TlsSessionSettings(string serverName, Encoding encoding) : this()
! {
! this.serverName = serverName;
! this.encoding = encoding;
! }
!
! public TlsSessionSettings(string serverName, int serverPort) : this()
! {
! this.serverName = serverName;
! this.serverPort = serverPort;
! }
!
! public TlsSessionSettings(string serverName, int serverPort, Encoding encoding) : this()
! {
! this.serverName = serverName;
! this.serverPort = serverPort;
! this.encoding = encoding;
! }
!
! public TlsSessionSettings(TlsProtocol protocol, string serverName) : this()
! {
! this.protocol = protocol;
! this.serverName = serverName;
! }
!
! public TlsSessionSettings(TlsProtocol protocol, string serverName, Encoding encoding) : this()
! {
! this.protocol = protocol;
! this.serverName = serverName;
! this.encoding = encoding;
! }
!
!
! public TlsSessionSettings(TlsProtocol protocol, string serverName, int serverPort) : this()
! {
! this.protocol = protocol;
! this.serverName = serverName;
! this.serverPort = serverPort;
! }
!
! public TlsSessionSettings(TlsProtocol protocol, string serverName, int serverPort, Encoding encoding) : this()
! {
! this.protocol = protocol;
! this.serverName = serverName;
! this.serverPort = serverPort;
! this.encoding = encoding;
! }
!
! public TlsSessionSettings(TlsProtocol protocol, X509CertificateCollection certificates) : this()
{
this.protocol = protocol;
***************
*** 66,73 ****
}
! public TlsSessionSettings(TlsProtocol protocol, X509Certificate[] certificates) : this()
{
this.protocol = protocol;
! this.certificates = new X509CertificateCollection(certificates);
}
--- 145,190 ----
}
! public TlsSessionSettings(TlsProtocol protocol, X509CertificateCollection certificates, Encoding encoding) : this()
{
this.protocol = protocol;
! this.certificates = certificates;
! this.encoding = encoding;
! }
!
! public TlsSessionSettings(TlsProtocol protocol, X509CertificateCollection certificates, string serverName, int serverPort) : this()
! {
! this.protocol = protocol;
! this.certificates = certificates;
! this.serverName = serverName;
! this.serverPort = serverPort;
! }
!
! public TlsSessionSettings(TlsProtocol protocol, X509CertificateCollection certificates, string serverName, int serverPort, Encoding encoding) : this()
! {
! this.protocol = protocol;
! this.certificates = certificates;
! this.serverName = serverName;
! this.serverPort = serverPort;
! this.encoding = encoding;
! }
!
! public TlsSessionSettings(TlsProtocol protocol, X509Certificate[] certificates)
! : this(protocol, new X509CertificateCollection(certificates))
! {
! }
!
! public TlsSessionSettings(TlsProtocol protocol, X509Certificate[] certificates, Encoding encoding)
! : this(protocol, new X509CertificateCollection(certificates), encoding)
! {
! }
!
! public TlsSessionSettings(TlsProtocol protocol, X509Certificate[] certificates, string serverName, int serverPort) :
! this(protocol, new X509CertificateCollection(certificates), serverName, serverPort)
! {
! }
!
! public TlsSessionSettings(TlsProtocol protocol, X509Certificate[] certificates, string serverName, int serverPort, Encoding encoding) :
! this(protocol, new X509CertificateCollection(certificates), serverName, serverPort, encoding)
! {
}
Index: TlsSessionState.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsSessionState.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TlsSessionState.cs 25 Aug 2003 16:40:43 -0000 1.4
--- TlsSessionState.cs 1 Sep 2003 10:19:44 -0000 1.5
***************
*** 21,27 ****
using System.Security.Cryptography;
! using PgSqlClient.Security.TLS.Cryptography;
! namespace PgSqlClient.Security.TLS
{
internal class TlsSessionState
--- 21,27 ----
using System.Security.Cryptography;
! using System.Security.Tls.Cryptography;
! namespace System.Security.Tls
{
internal class TlsSessionState
Index: TlsStreamReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsStreamReader.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsStreamReader.cs 20 Aug 2003 11:48:20 -0000 1.1
--- TlsStreamReader.cs 1 Sep 2003 10:19:44 -0000 1.2
***************
*** 22,26 ****
using System.Net;
! namespace PgSqlClient.Security.TLS
{
internal class TlsStreamReader : BinaryReader
--- 22,26 ----
using System.Net;
! namespace System.Security.Tls
{
internal class TlsStreamReader : BinaryReader
Index: TlsStreamWriter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsStreamWriter.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsStreamWriter.cs 20 Aug 2003 11:48:20 -0000 1.1
--- TlsStreamWriter.cs 1 Sep 2003 10:19:44 -0000 1.2
***************
*** 22,26 ****
using System.Net;
! namespace PgSqlClient.Security.TLS
{
internal class TlsStreamWriter : BinaryWriter
--- 22,26 ----
using System.Net;
! namespace System.Security.Tls
{
internal class TlsStreamWriter : BinaryWriter
Index: TlsWriter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/TlsWriter.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TlsWriter.cs 24 Aug 2003 21:08:07 -0000 1.5
--- TlsWriter.cs 1 Sep 2003 10:19:44 -0000 1.6
***************
*** 24,31 ****
using System.Security.Cryptography;
! using PgSqlClient.Security.TLS.Alerts;
! using PgSqlClient.Security.TLS.Handshake;
! namespace PgSqlClient.Security.TLS
{
public class TlsWriter : BinaryWriter
--- 24,31 ----
using System.Security.Cryptography;
! using System.Security.Tls.Alerts;
! using System.Security.Tls.Handshake;
! namespace System.Security.Tls
{
public class TlsWriter : BinaryWriter
***************
*** 34,37 ****
--- 34,38 ----
private TlsSession session;
+ private Encoding encoding;
#endregion
***************
*** 50,54 ****
internal TlsWriter(TlsSession session, Stream output, Encoding encoding) : base(output, encoding)
{
! this.session = session;
}
--- 51,56 ----
internal TlsWriter(TlsSession session, Stream output, Encoding encoding) : base(output, encoding)
{
! this.session = session;
! this.encoding = encoding;
}
***************
*** 57,74 ****
#region TLS_METHODS
! public void WriteRecord(byte[] recordData)
{
! writeRecord(TlsContentType.ApplicationData, recordData);
}
! #endregion
! #region INTERNAL_METHODS
! internal void WriteShort(short val)
{
! Write((short)IPAddress.HostToNetworkOrder(val));
}
internal void WriteRecord(TlsHandshakeType type)
{
--- 59,170 ----
#region TLS_METHODS
! public override void Write(bool value)
{
! this.Write(BitConverter.GetBytes(value));
}
! public override void Write(byte value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
! public override void Write(byte[] buffer)
! {
! this.Write(buffer, 0, buffer.Length);
! }
! public override void Write(char value)
{
! this.Write(encoding.GetBytes(new char[] {value}));
! }
!
! public override void Write(char[] value)
! {
! this.Write(encoding.GetBytes(value));
! }
!
! public override void Write(decimal value)
! {
! throw new NotSupportedException("Decimal datatype is not supported.");
! }
!
! public override void Write(double value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! public override void Write(short value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! public override void Write(int value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! public override void Write(long value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! [CLSCompliant(false)]
! public override void Write(sbyte value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! public override void Write(float value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! public override void Write(string value)
! {
! this.Write(encoding.GetBytes(value));
! }
!
! [CLSCompliant(false)]
! public override void Write(ushort value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! [CLSCompliant(false)]
! public override void Write(uint value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! [CLSCompliant(false)]
! public override void Write(ulong value)
! {
! this.Write(BitConverter.GetBytes(value));
! }
!
! public override void Write(char[] chars, int index, int count)
! {
! this.Write(encoding.GetBytes(chars, index, count));
! }
!
! public override void Write(byte[] buffer, int index, int count)
! {
! if (session.IsSecure)
! {
! byte[] recordData = new byte[count];
! System.Array.Copy(buffer, index, recordData, 0, count);
!
! writeRecord(TlsContentType.ApplicationData, recordData);
! }
! else
! {
! base.Write(buffer, index, count);
! }
}
+ #endregion
+
+ #region INTERNAL_METHODS
+
internal void WriteRecord(TlsHandshakeType type)
{
***************
*** 118,121 ****
--- 214,222 ----
private void writeRecord(TlsContentType contentType, byte[] recordData)
{
+ if (session.State.ConnectionEnd)
+ {
+ session.ThrowException("The session is finished and it's no longer valid.");
+ }
+
byte[][] fragments = fragmentData(recordData);
***************
*** 131,139 ****
// Write tls message
! Write((byte)contentType);
! WriteShort((short)TlsProtocol.Tls1);
! WriteShort((short)fragment.Length);
! Write(fragment);
Flush();
}
}
--- 232,247 ----
// 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 & flush data
! base.Write(record.GetBytes());
Flush();
+
+ // Reset record data
+ record.Reset();
}
}
|
|
From: <car...@us...> - 2003-08-31 12:59:40
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv3553
Modified Files:
PgCommandBuilder.cs
Log Message:
Improved command builder implementation
Index: PgCommandBuilder.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommandBuilder.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PgCommandBuilder.cs 22 Aug 2003 19:39:58 -0000 1.5
--- PgCommandBuilder.cs 31 Aug 2003 12:59:36 -0000 1.6
***************
*** 239,243 ****
}
- buildSchemaTable();
buildInsertCommand(null, null);
}
--- 239,242 ----
***************
*** 271,275 ****
}
- buildSchemaTable();
buildUpdateCommand(null, null);
}
--- 270,273 ----
***************
*** 303,307 ****
}
- buildSchemaTable();
buildDeleteCommand(null, null);
}
--- 301,304 ----
***************
*** 341,344 ****
--- 338,343 ----
string dsColumnName = String.Empty;
+ buildSchemaTable();
+
insertCommand = new PgCommand(sql.ToString(), selectCommand.Connection, selectCommand.Transaction);
***************
*** 409,412 ****
--- 408,413 ----
string dsColumnName = String.Empty;
+ buildSchemaTable();
+
if (!hasPrimaryKey && !hasUniqueKey)
{
***************
*** 519,522 ****
--- 520,525 ----
string dsColumnName = String.Empty;
+ buildSchemaTable();
+
if (!hasPrimaryKey && !hasUniqueKey)
{
***************
*** 752,771 ****
try
{
- buildSchemaTable();
-
switch (e.StatementType)
{
case StatementType.Insert:
! e.Command = buildInsertCommand(e.Row, e.TableMapping);
e.Status = UpdateStatus.Continue;
break;
case StatementType.Update:
! e.Command = buildUpdateCommand(e.Row, e.TableMapping);
e.Status = UpdateStatus.Continue;
break;
case StatementType.Delete:
! e.Command = buildDeleteCommand(e.Row, e.TableMapping);
e.Status = UpdateStatus.Continue;
break;
--- 755,781 ----
try
{
switch (e.StatementType)
{
case StatementType.Insert:
! if (e.Command == null)
! {
! e.Command = buildInsertCommand(e.Row, e.TableMapping);
! }
e.Status = UpdateStatus.Continue;
break;
case StatementType.Update:
! if (e.Command == null)
! {
! e.Command = buildUpdateCommand(e.Row, e.TableMapping);
! }
e.Status = UpdateStatus.Continue;
break;
case StatementType.Delete:
! if (e.Command == null)
! {
! e.Command = buildDeleteCommand(e.Row, e.TableMapping);
! }
e.Status = UpdateStatus.Continue;
break;
|
|
From: <car...@us...> - 2003-08-31 12:55:27
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10
In directory sc8-pr-cvs1:/tmp/cvs-serv3035
Modified Files:
makefile PgSqlClient.build PgSqlClient_Mono.build
Log Message:
Updated build files for windows ( .net & mono ) and linux ( mono )
Index: makefile
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** makefile 2 Aug 2003 19:42:38 -0000 1.1.1.1
--- makefile 31 Aug 2003 12:55:21 -0000 1.2
***************
*** 1,5 ****
LIBRARY = PostgreSql.Data.PgSqlClient.dll
! all: $(LIBRARY) install clean
CSC = mcs
--- 1,7 ----
+ PGTEST = pgtest.exe
+ TLS = PgSqlClient.Security.Tls.dll
LIBRARY = PostgreSql.Data.PgSqlClient.dll
! all: ${TLS} $(LIBRARY) $(PGTEST) install clean
CSC = mcs
***************
*** 10,25 ****
TOOL_RESOURCES = -resource:PostgreSql.Data.PgSqlClient/source/Resources/ToolBox/PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp -resource:PostgreSql.Data.PgSqlClient/source/Resources/ToolBox/PgCommand.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.FbCommand.bmp -resource:PostgreSql.Data.PgSqlClient/source/Resources/ToolBox/PgDataAdapter.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.FbDataAdapter.bmp
# Source files
RECURSE_SOURCE = -recurse:./PostgreSql.Data.PgSqlClient/source/*.cs
# Defines
DEFINE = -define:_DEBUG
PostgreSql.Data.PgSqlClient.dll:
! $(CSC) -target:library -out:$(LIBRARY) $(LD_FLAGS) $(DEFINE) $(TOOL_RESOURCES) $(RECURSE_SOURCE)
install:
rm -rf build
mkdir -p build
$(COPY) $(LIBRARY) ./build
clean:
! rm $(LIBRARY)
\ No newline at end of file
--- 12,39 ----
TOOL_RESOURCES = -resource:PostgreSql.Data.PgSqlClient/source/Resources/ToolBox/PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp -resource:PostgreSql.Data.PgSqlClient/source/Resources/ToolBox/PgCommand.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.FbCommand.bmp -resource:PostgreSql.Data.PgSqlClient/source/Resources/ToolBox/PgDataAdapter.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.FbDataAdapter.bmp
# Source files
+ RECURSE_PGTEST = -recurse:./PgTest/*.cs
+ RECURSE_TLS = -recurse:./PgSqlClient.Security.Tls/source/*.cs
RECURSE_SOURCE = -recurse:./PostgreSql.Data.PgSqlClient/source/*.cs
# Defines
DEFINE = -define:_DEBUG
+ PgSqlClient.Security.Tls.dll:
+ $(CSC) -target:library -out:$(TLS) $(LD_FLAGS) $(DEFINE) $(RECURSE_TLS)
+
PostgreSql.Data.PgSqlClient.dll:
! $(CSC) -target:library -out:$(LIBRARY) $(LD_FLAGS) -reference:PgSqlClient.Security.Tls.dll $(DEFINE) $(TOOL_RESOURCES) $(RECURSE_SOURCE)
!
! pgtest.exe:
! $(CSC) -target:exe -out:$(PGTEST) $(LD_FLAGS) $(DEFINE) $(RECURSE_PGTEST) -reference:PgSqlClient.Security.Tls.dll -reference:PostgreSql.Data.PgSqlClient.dll
install:
rm -rf build
mkdir -p build
+ $(COPY) $(TLS) ./build
$(COPY) $(LIBRARY) ./build
+ $(COPY) $(PGTEST) ./build
clean:
! rm $(TLS)
! rm $(LIBRARY)
! rm $(PGTEST)
\ No newline at end of file
Index: PgSqlClient.build
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.build,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgSqlClient.build 2 Aug 2003 19:42:38 -0000 1.1.1.1
--- PgSqlClient.build 31 Aug 2003 12:55:21 -0000 1.2
***************
*** 14,17 ****
--- 14,18 ----
<property name="build.dir" value="build" />
<property name="src.dir" value="${project.FormalName}\source" />
+ <property name="tls.src.dir" value="PgSqlClient.Security.Tls\source" />
<property name="nunit.test.dir" value="PostgreSql.Data.PgSqlClient.UnitTests"/>
<property name="resources.dir" value="${src.dir}\Resources" />
***************
*** 36,40 ****
<ifnot propertyexists="nunit.framework.dll">
<sysinfo />
! <property name="nunit.framework.dll" value="${sys.os.folder.programfiles}\NUnit V2.1\bin\nunit.framework.dll"
readonly="false" />
</ifnot>
--- 37,41 ----
<ifnot propertyexists="nunit.framework.dll">
<sysinfo />
! <property name="nunit.framework.dll" value="${sys.os.folder.programfiles}\NUnit V2.0\bin\nunit.framework.dll"
readonly="false" />
</ifnot>
***************
*** 123,126 ****
--- 124,128 ----
<!-- Target for check build configuration -->
<target name="build-all" depends="check-build-config">
+ <call target="build-tls" />
<call target="build-pgsqlclient" />
<if propertyexists="nunit.framework.dll">
***************
*** 130,133 ****
--- 132,154 ----
</target>
+ <!-- Taget for build TLS Assembly -->
+ <target name="build-tls">
+ <mkdir dir="${build.dir}" failonerror="false" />
+
+ <!-- compile PgSqlClient.Security.TLS -->
+ <csc output="${build.dir}\PgSqlClient.Security.Tls.dll" target="library" define="${build.define}">
+ <sources>
+ <includes name="${tls.src.dir}/**/*.cs" />
+ </sources>
+ <references>
+ <absolute file="System.dll" />
+ <absolute file="System.Data.dll" />
+ <absolute file="System.Drawing.dll" />
+ <absolute file="System.XML.dll" />
+ </references>
+ <arg value="/optimize+" />
+ </csc>
+ </target>
+
<!-- Taget for build PgSqlClient .NET Data Provider Assembly -->
<target name="build-pgsqlclient">
***************
*** 144,147 ****
--- 165,169 ----
<absolute file="System.Drawing.dll" />
<absolute file="System.XML.dll" />
+ <includes name="${build.dir}/PgSqlClient.Security.Tls.dll" />
</references>
<arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp" />
Index: PgSqlClient_Mono.build
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient_Mono.build,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgSqlClient_Mono.build 2 Aug 2003 19:42:38 -0000 1.1.1.1
--- PgSqlClient_Mono.build 31 Aug 2003 12:55:21 -0000 1.2
***************
*** 13,16 ****
--- 13,17 ----
<property name="base.dir" value="." />
<property name="build.dir" value="build" />
+ <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" />
***************
*** 37,40 ****
--- 38,42 ----
<!-- Target for check build configuration -->
<target name="build-all">
+ <call target="build-tls" />
<call target="build-pgsqlclient" />
<if propertyexists="htmlhelp.compiler">
***************
*** 43,46 ****
--- 45,67 ----
</target>
+ <!-- Taget for build TLS Assembly -->
+ <target name="build-tls">
+ <mkdir dir="${build.dir}" failonerror="false" />
+
+ <!-- compile PgSqlClient.Security.TLS -->
+ <csc output="${build.dir}\PgSqlClient.Security.Tls.dll" target="library" define="${build.define}">
+ <sources>
+ <includes name="${tls.src.dir}/**/*.cs" />
+ </sources>
+ <references>
+ <absolute file="System.dll" />
+ <absolute file="System.Data.dll" />
+ <absolute file="System.Drawing.dll" />
+ <absolute file="System.XML.dll" />
+ </references>
+ <arg value="/optimize+" />
+ </csc>
+ </target>
+
<!-- Taget for build PgSqlClient .NET Data Provider Assembly -->
<target name="build-pgsqlclient">
***************
*** 57,60 ****
--- 78,82 ----
<includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Drawing.dll" />
<includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" />
+ <includes name="${build.dir}/PgSqlClient.Security.Tls.dll" />
</references>
<arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolboxBitmaps.PgConnection.bmp" />
|