pgsqlclient-checkins Mailing List for PostgreSqlClient (Page 15)
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: Carlos G. Á. <car...@us...> - 2004-07-22 10:58:24
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20194 Modified Files: PgCastsSchema.cs PgCheckConstraints.cs PgCheckConstraintsByTable.cs PgColumnsSchema.cs PgForeignKeysSchema.cs PgFunctionPrivilegesSchema.cs PgFunctionsSchema.cs PgTableConstraintsSchema.cs PgTablesSchema.cs Log Message: 2004-07-22 Carlos Guzman Alvarez <car...@te...> * USe PascalCase naming for private methods in all classes. Index: PgCastsSchema.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCastsSchema.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgCastsSchema.cs 6 Apr 2004 14:17:33 -0000 1.6 --- PgCastsSchema.cs 22 Jul 2004 10:58:15 -0000 1.7 *************** *** 50,54 **** AddDataColumn("pg_namespace.nspname", "FUNCTION_SCHEMA"); AddDataColumn("pg_proc.proname" , "FUNCTION_NAME"); ! AddDataColumn(getContextExpression("pg_cast.castcontext"), "CAST_CONTEXT"); } --- 50,54 ---- AddDataColumn("pg_namespace.nspname", "FUNCTION_SCHEMA"); AddDataColumn("pg_proc.proname" , "FUNCTION_NAME"); ! AddDataColumn(this.GetContextExpression("pg_cast.castcontext"), "CAST_CONTEXT"); } *************** *** 85,89 **** #region Private Methods ! private string getContextExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 85,89 ---- #region Private Methods ! private string GetContextExpression(string fieldName) { StringBuilder expression = new StringBuilder(); Index: PgTablesSchema.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgTablesSchema.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgTablesSchema.cs 6 Apr 2004 14:17:33 -0000 1.6 --- PgTablesSchema.cs 22 Jul 2004 10:58:15 -0000 1.7 *************** *** 44,48 **** AddRestrictionColumn("pg_namespace.nspname" , "TABLE_SCHEMA", null); AddRestrictionColumn("pg_class.relname" , "TABLE_NAME", null); ! AddRestrictionColumn(getTableTypeExpression("pg_class.relkind"), "TABLE_TYPE", "pg_class.relkind"); } --- 44,48 ---- AddRestrictionColumn("pg_namespace.nspname" , "TABLE_SCHEMA", null); AddRestrictionColumn("pg_class.relname" , "TABLE_NAME", null); ! AddRestrictionColumn(this.GetTableTypeExpression("pg_class.relkind"), "TABLE_TYPE", "pg_class.relkind"); } *************** *** 129,133 **** #region Private Methods ! private string getTableTypeExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 129,133 ---- #region Private Methods ! private string GetTableTypeExpression(string fieldName) { StringBuilder expression = new StringBuilder(); Index: PgFunctionPrivilegesSchema.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgFunctionPrivilegesSchema.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PgFunctionPrivilegesSchema.cs 6 Apr 2004 14:17:33 -0000 1.7 --- PgFunctionPrivilegesSchema.cs 22 Jul 2004 10:58:15 -0000 1.8 *************** *** 135,139 **** #region Private Methods ! private string getVolatileExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 135,139 ---- #region Private Methods ! private string GetVolatileExpression(string fieldName) { StringBuilder expression = new StringBuilder(); Index: PgCheckConstraintsByTable.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCheckConstraintsByTable.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgCheckConstraintsByTable.cs 6 Apr 2004 14:17:33 -0000 1.6 --- PgCheckConstraintsByTable.cs 22 Jul 2004 10:58:15 -0000 1.7 *************** *** 115,119 **** #region Private Methods ! private string getConstraintTypeExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 115,119 ---- #region Private Methods ! private string GetConstraintTypeExpression(string fieldName) { StringBuilder expression = new StringBuilder(); Index: PgFunctionsSchema.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgFunctionsSchema.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgFunctionsSchema.cs 6 Apr 2004 14:17:33 -0000 1.6 --- PgFunctionsSchema.cs 22 Jul 2004 10:58:15 -0000 1.7 *************** *** 52,57 **** AddDataColumn("pg_proc.prosecdef" , "IS_SECURITY_DEFINER"); AddDataColumn("pg_proc.proisstrict" , "IS_STRICT"); ! AddDataColumn(getVolatileExpression("pg_proc.provolatile") , "VOLATILE"); ! AddDataColumn("pg_proc.proretset" , "RETURNS_SET"); AddDataColumn("pg_proc.prorettype" , "RETURN_TYPE"); AddDataColumn("pg_proc.pronargs" , "ARGUMENT_NUMBER"); --- 52,57 ---- AddDataColumn("pg_proc.prosecdef" , "IS_SECURITY_DEFINER"); AddDataColumn("pg_proc.proisstrict" , "IS_STRICT"); ! AddDataColumn(this.GetVolatileExpression("pg_proc.provolatile"), "VOLATILE"); ! AddDataColumn("pg_proc.proretset" , "RETURNS_SET"); AddDataColumn("pg_proc.prorettype" , "RETURN_TYPE"); AddDataColumn("pg_proc.pronargs" , "ARGUMENT_NUMBER"); *************** *** 93,97 **** #region Private Methods ! private string getVolatileExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 93,97 ---- #region Private Methods ! private string GetVolatileExpression(string fieldName) { StringBuilder expression = new StringBuilder(); Index: PgColumnsSchema.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgColumnsSchema.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PgColumnsSchema.cs 6 Apr 2004 14:17:33 -0000 1.8 --- PgColumnsSchema.cs 22 Jul 2004 10:58:15 -0000 1.9 *************** *** 57,61 **** AddDataColumn("pg_attribute.attnotnull" , "IS_NOT_NULL"); AddDataColumn("(pg_depend.objid is not null)", "IS_AUTOINCREMENT"); ! AddDataColumn(getStorageExpression("pg_attribute.attstorage"), "STORAGE"); AddDataColumn("pg_description.description", "DESCRIPTION"); } --- 57,61 ---- AddDataColumn("pg_attribute.attnotnull" , "IS_NOT_NULL"); AddDataColumn("(pg_depend.objid is not null)", "IS_AUTOINCREMENT"); ! AddDataColumn(this.GetStorageExpression("pg_attribute.attstorage"), "STORAGE"); AddDataColumn("pg_description.description", "DESCRIPTION"); } *************** *** 102,106 **** #region Private Methods ! private string getSerialExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 102,106 ---- #region Private Methods ! private string GetSerialExpression(string fieldName) { StringBuilder expression = new StringBuilder(); *************** *** 114,118 **** } ! private string getStorageExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 114,118 ---- } ! private string GetStorageExpression(string fieldName) { StringBuilder expression = new StringBuilder(); Index: PgCheckConstraints.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCheckConstraints.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgCheckConstraints.cs 6 Apr 2004 14:17:33 -0000 1.6 --- PgCheckConstraints.cs 22 Jul 2004 10:58:15 -0000 1.7 *************** *** 109,113 **** #region Private Methods ! private string getConstraintTypeExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 109,113 ---- #region Private Methods ! private string GetConstraintTypeExpression(string fieldName) { StringBuilder expression = new StringBuilder(); Index: PgTableConstraintsSchema.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgTableConstraintsSchema.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgTableConstraintsSchema.cs 6 Apr 2004 14:17:33 -0000 1.6 --- PgTableConstraintsSchema.cs 22 Jul 2004 10:58:15 -0000 1.7 *************** *** 46,50 **** AddRestrictionColumn("pg_namespace.nspname", "TABLE_SCHEMA", null); AddRestrictionColumn("pg_class.relname", "TABLE_NAME", null); ! AddRestrictionColumn(getConstraintTypeExpression("pg_constraint.contype"), "CONSTRAINT_TYPE", "pg_constraint.contype"); } --- 46,50 ---- AddRestrictionColumn("pg_namespace.nspname", "TABLE_SCHEMA", null); AddRestrictionColumn("pg_class.relname", "TABLE_NAME", null); ! AddRestrictionColumn(this.GetConstraintTypeExpression("pg_constraint.contype"), "CONSTRAINT_TYPE", "pg_constraint.contype"); } *************** *** 115,119 **** #region Private Methods ! private string getConstraintTypeExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 115,119 ---- #region Private Methods ! private string GetConstraintTypeExpression(string fieldName) { StringBuilder expression = new StringBuilder(); Index: PgForeignKeysSchema.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgForeignKeysSchema.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgForeignKeysSchema.cs 6 Apr 2004 14:17:33 -0000 1.6 --- PgForeignKeysSchema.cs 22 Jul 2004 10:58:15 -0000 1.7 *************** *** 52,58 **** AddDataColumn("pg_constraint.conkey" , "PK_COLUMNS"); AddDataColumn("pg_constraint.confkey" , "FK_COLUMNS"); ! AddDataColumn(getRuleExpression("pg_constraint.confupdtype"), "UPDATE_RULE"); ! AddDataColumn(getRuleExpression("pg_constraint.confdeltype"), "DELETE_RULE"); ! AddDataColumn("pg_constraint.conname" , "FK_NAME"); AddDataColumn("pg_constraint.condeferrable" , "DEFERRABILITY"); AddDataColumn("pg_constraint.condeferred" , "IS_DEFERRED"); --- 52,58 ---- AddDataColumn("pg_constraint.conkey" , "PK_COLUMNS"); AddDataColumn("pg_constraint.confkey" , "FK_COLUMNS"); ! AddDataColumn(this.GetRuleExpression("pg_constraint.confupdtype"), "UPDATE_RULE"); ! AddDataColumn(this.GetRuleExpression("pg_constraint.confdeltype"), "DELETE_RULE"); ! AddDataColumn("pg_constraint.conname" , "FK_NAME"); AddDataColumn("pg_constraint.condeferrable" , "DEFERRABILITY"); AddDataColumn("pg_constraint.condeferred" , "IS_DEFERRED"); *************** *** 96,100 **** #region Private Methods ! private string getRuleExpression(string fieldName) { StringBuilder expression = new StringBuilder(); --- 96,100 ---- #region Private Methods ! private string GetRuleExpression(string fieldName) { StringBuilder expression = new StringBuilder(); |
From: Carlos G. Á. <car...@us...> - 2004-07-22 10:58:07
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20099 Modified Files: PgCommand.cs PgCommandBuilder.cs PgConnection.cs PgConnectionPool.cs PgDataReader.cs PgDbConnection.cs PgErrorCollection.cs PgException.cs Log Message: 2004-07-22 Carlos Guzman Alvarez <car...@te...> * USe PascalCase naming for private methods in all classes. Index: PgConnectionPool.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgConnectionPool.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgConnectionPool.cs 10 Apr 2004 21:35:36 -0000 1.6 --- PgConnectionPool.cs 22 Jul 2004 10:57:53 -0000 1.7 *************** *** 165,169 **** } ! private void RunCleanUp() { TimeSpan interval = new TimeSpan(0, 0, 10); --- 165,173 ---- } ! #endregion ! ! #region Private methods ! ! private void RunCleanUp() { TimeSpan interval = new TimeSpan(0, 0, 10); Index: PgErrorCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgErrorCollection.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgErrorCollection.cs 10 Apr 2004 21:35:36 -0000 1.6 --- PgErrorCollection.cs 22 Jul 2004 10:57:53 -0000 1.7 *************** *** 98,104 **** return this.Add(error); ! } ! private bool cultureAwareCompare(string strA, string strB) { return CultureInfo.CurrentCulture.CompareInfo.Compare( --- 98,108 ---- return this.Add(error); ! } ! #endregion ! ! #region Private Methods ! ! private bool cultureAwareCompare(string strA, string strB) { return CultureInfo.CurrentCulture.CompareInfo.Compare( Index: PgDbConnection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDbConnection.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PgDbConnection.cs 10 Apr 2004 20:15:33 -0000 1.9 --- PgDbConnection.cs 22 Jul 2004 10:57:53 -0000 1.10 *************** *** 92,96 **** { this.connectionString = connectionString; ! this.parseConnectionString(); } --- 92,96 ---- { this.connectionString = connectionString; ! this.ParseConnectionString(); } *************** *** 122,128 **** throw new PgException(ex.Message, ex); } ! } ! private void parseConnectionString() { MatchCollection elements = search.Matches(this.connectionString); --- 122,153 ---- throw new PgException(ex.Message, ex); } ! } ! #endregion ! ! #region Internal Methods ! ! internal bool Verify() ! { ! bool isValid = true; ! ! try ! { ! // Try to send a Sync message to the PostgreSQL Server ! this.db.Sync(); ! } ! catch (Exception) ! { ! isValid = false; ! } ! ! return isValid; ! } ! ! #endregion ! ! #region Private Methods ! ! private void ParseConnectionString() { MatchCollection elements = search.Matches(this.connectionString); *************** *** 198,221 **** } } ! } ! ! internal bool Verify() ! { ! bool isValid = true; ! ! try ! { ! // Try to send a Sync message to the PostgreSQL Server ! this.db.Sync(); ! } ! catch (Exception) ! { ! isValid = false; ! } ! ! return isValid; ! } ! #endregion } } \ No newline at end of file --- 223,229 ---- } } ! } ! #endregion } } \ No newline at end of file Index: PgCommand.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommand.cs,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** PgCommand.cs 12 Jun 2004 14:26:10 -0000 1.39 --- PgCommand.cs 22 Jul 2004 10:57:53 -0000 1.40 *************** *** 346,352 **** public int ExecuteNonQuery() { ! this.checkCommand(); ! this.splitBatchCommands(false); this.InternalPrepare(); --- 346,352 ---- public int ExecuteNonQuery() { ! this.CheckCommand(); ! this.SplitBatchCommands(false); this.InternalPrepare(); *************** *** 375,383 **** public PgDataReader ExecuteReader(CommandBehavior behavior) { ! this.checkCommand(); this.commandBehavior = behavior; ! this.splitBatchCommands(true); this.InternalPrepare(); --- 375,383 ---- public PgDataReader ExecuteReader(CommandBehavior behavior) { ! this.CheckCommand(); this.commandBehavior = behavior; ! this.SplitBatchCommands(true); this.InternalPrepare(); *************** *** 397,405 **** public object ExecuteScalar() { ! this.checkCommand(); object returnValue = null; ! this.splitBatchCommands(false); this.InternalPrepare(); --- 397,405 ---- public object ExecuteScalar() { ! this.CheckCommand(); object returnValue = null; ! this.SplitBatchCommands(false); this.InternalPrepare(); *************** *** 416,422 **** public void Prepare() { ! this.checkCommand(); ! this.splitBatchCommands(false); this.InternalPrepare(); this.connection.ActiveCommands.Add(this); --- 416,422 ---- public void Prepare() { ! this.CheckCommand(); ! this.SplitBatchCommands(false); this.InternalPrepare(); this.connection.ActiveCommands.Add(this); *************** *** 427,431 **** string plan; ! this.checkCommand(); try --- 427,431 ---- string plan; ! this.CheckCommand(); try *************** *** 458,462 **** if (this.commands == null) { ! this.splitBatchCommands(false); } --- 458,462 ---- if (this.commands == null) { ! this.SplitBatchCommands(false); } *************** *** 469,482 **** if (this.commandType == CommandType.StoredProcedure) { ! this.commands[actualCommand] = this.buildStoredProcedureSql(); } ! ! string prepareName = "PS" + getStmtName(); ! string portalName = "PR" + getStmtName(); ! ! this.statement = this.connection.DbConnection.DB.CreateStatement( prepareName, portalName, ! this.parseParameterNames()); // Parse statement --- 469,482 ---- if (this.commandType == CommandType.StoredProcedure) { ! this.commands[actualCommand] = this.BuildStoredProcedureSql(); } ! ! string prepareName = "PS" + this.GetStmtName(); ! string portalName = "PR" + this.GetStmtName(); ! ! this.statement = this.connection.DbConnection.DB.CreateStatement( prepareName, portalName, ! this.ParseParameterNames()); // Parse statement *************** *** 505,509 **** { // Set parameter values ! this.setParameterValues(); } --- 505,509 ---- { // Set parameter values ! this.SetParameterValues(); } *************** *** 598,602 **** #region Private Methods ! private void checkCommand() { if (this.transaction != null && this.transaction.IsUpdated) --- 598,602 ---- #region Private Methods ! private void CheckCommand() { if (this.transaction != null && this.transaction.IsUpdated) *************** *** 628,632 **** } ! private string buildStoredProcedureSql() { string commandText = this.commands[actualCommand]; --- 628,632 ---- } ! private string BuildStoredProcedureSql() { string commandText = this.commands[actualCommand]; *************** *** 664,673 **** } ! private string getStmtName() { return GetHashCode().ToString() + this.connection.GetHashCode().ToString() + DateTime.Now.Ticks; } ! private string parseParameterNames() { string sql = this.commands[actualCommand]; --- 664,673 ---- } ! private string GetStmtName() { return GetHashCode().ToString() + this.connection.GetHashCode().ToString() + DateTime.Now.Ticks; } ! private string ParseParameterNames() { string sql = this.commands[actualCommand]; *************** *** 684,688 **** Regex r = new Regex(pattern, RegexOptions.ExplicitCapture); ! MatchEvaluator me = new MatchEvaluator(matchEvaluator); sql = r.Replace(sql, me); --- 684,688 ---- Regex r = new Regex(pattern, RegexOptions.ExplicitCapture); ! MatchEvaluator me = new MatchEvaluator(NamedParamsMatchEvaluator); sql = r.Replace(sql, me); *************** *** 694,698 **** } ! private string matchEvaluator(Match match) { string input = match.Value; --- 694,698 ---- } ! private string NamedParamsMatchEvaluator(Match match) { string input = match.Value; *************** *** 724,728 **** } ! private void setParameterValues() { if (this.parameters.Count != 0) --- 724,728 ---- } ! private void SetParameterValues() { if (this.parameters.Count != 0) *************** *** 753,757 **** } ! private void splitBatchCommands(bool batchAllowed) { if (this.commands == null) --- 753,757 ---- } ! private void SplitBatchCommands(bool batchAllowed) { if (this.commands == null) Index: PgException.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PgException.cs 10 Apr 2004 20:15:33 -0000 1.4 --- PgException.cs 22 Jul 2004 10:57:53 -0000 1.5 *************** *** 65,76 **** this.errors = new PgErrorCollection(); ! this.getPgExceptionErrors(ex); } #endregion ! #region Methods ! private void getPgExceptionErrors(PgClientException ex) { foreach (PgClientError error in ex.Errors) --- 65,76 ---- this.errors = new PgErrorCollection(); ! this.GetPgExceptionErrors(ex); } #endregion ! #region Private Methods ! private void GetPgExceptionErrors(PgClientException ex) { foreach (PgClientError error in ex.Errors) Index: PgDataReader.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataReader.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PgDataReader.cs 10 Apr 2004 21:35:36 -0000 1.22 --- PgDataReader.cs 22 Jul 2004 10:57:53 -0000 1.23 *************** *** 146,150 **** // This will update RecordsAffected property ! this.updateRecordsAffected(); if (this.command != null && !this.command.IsDisposed) --- 146,150 ---- // This will update RecordsAffected property ! this.UpdateRecordsAffected(); if (this.command != null && !this.command.IsDisposed) *************** *** 178,182 **** } ! this.updateRecordsAffected(); bool returnValue = this.command.NextResult(); --- 178,182 ---- } ! this.UpdateRecordsAffected(); bool returnValue = this.command.NextResult(); *************** *** 233,242 **** if (schemaTable == null) { ! schemaTable = getSchemaTableStructure(); schemaTable.BeginLoadData(); ! PgCommand cInfoCmd = getColumnInfoCmd(); ! PgCommand pKeyCmd = getPrimaryKeyInfoCmd(); for (int i = 0; i < command.Statement.RowDescriptor.Fields.Length; i++) --- 233,242 ---- if (schemaTable == null) { ! schemaTable = this.GetSchemaTableStructure(); schemaTable.BeginLoadData(); ! PgCommand cInfoCmd = this.GetColumnInfoCmd(); ! PgCommand pKeyCmd = this.GetPrimaryKeyInfoCmd(); for (int i = 0; i < command.Statement.RowDescriptor.Fields.Length; i++) *************** *** 275,285 **** DataRow schemaRow = schemaTable.NewRow(); ! schemaRow["ColumnName"] = getName(i); schemaRow["ColumnOrdinal"] = i; ! schemaRow["ColumnSize"] = getSize(i); ! if (isNumeric(i)) { ! schemaRow["NumericPrecision"] = getNumericPrecision(i); ! schemaRow["NumericScale"] = getNumericScale(i); } else --- 275,285 ---- DataRow schemaRow = schemaTable.NewRow(); ! schemaRow["ColumnName"] = this.GetName(i); schemaRow["ColumnOrdinal"] = i; ! schemaRow["ColumnSize"] = this.GetSize(i); ! if (this.IsNumeric(i)) { ! schemaRow["NumericPrecision"] = this.GetNumericPrecision(i); ! schemaRow["NumericScale"] = this.GetNumericScale(i); } else *************** *** 288,304 **** schemaRow["NumericScale"] = DBNull.Value; } ! schemaRow["DataType"] = getFieldType(i); ! schemaRow["ProviderType"] = getProviderType(i); ! schemaRow["IsLong"] = isLong(i); schemaRow["IsRowVersion"] = false; schemaRow["IsUnique"] = false; ! schemaRow["IsAliased"] = isAliased(i); ! schemaRow["IsExpression"] = isExpression(i); ! schemaRow["BaseCatalogName"] = System.DBNull.Value; if (columnInfo != null) { schemaRow["IsReadOnly"] = (bool)columnInfo[10]; schemaRow["IsAutoIncrement"] = (bool)columnInfo[10]; ! schemaRow["IsKey"] = isPrimaryKey(pKeyInfo, (short)columnInfo[6]); schemaRow["AllowDBNull"] = ((bool)columnInfo[9]) ? false : true; schemaRow["BaseSchemaName"] = columnInfo[0].ToString(); --- 288,304 ---- schemaRow["NumericScale"] = DBNull.Value; } ! schemaRow["DataType"] = this.GetFieldType(i); ! schemaRow["ProviderType"] = this.GetProviderType(i); ! schemaRow["IsLong"] = this.IsLong(i); schemaRow["IsRowVersion"] = false; schemaRow["IsUnique"] = false; ! schemaRow["IsAliased"] = this.IsAliased(i); ! schemaRow["IsExpression"] = this.IsExpression(i); ! schemaRow["BaseCatalogName"] = System.DBNull.Value; if (columnInfo != null) { schemaRow["IsReadOnly"] = (bool)columnInfo[10]; schemaRow["IsAutoIncrement"] = (bool)columnInfo[10]; ! schemaRow["IsKey"] = this.IsPrimaryKey(pKeyInfo, (short)columnInfo[6]); schemaRow["AllowDBNull"] = ((bool)columnInfo[9]) ? false : true; schemaRow["BaseSchemaName"] = columnInfo[0].ToString(); *************** *** 329,333 **** } ! private PgCommand getColumnInfoCmd() { PgDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Columns); --- 329,333 ---- } ! private PgCommand GetColumnInfoCmd() { PgDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Columns); *************** *** 344,348 **** } ! private PgCommand getPrimaryKeyInfoCmd() { PgDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Primary_Keys); --- 344,348 ---- } ! private PgCommand GetPrimaryKeyInfoCmd() { PgDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Primary_Keys); *************** *** 357,361 **** } ! private bool isPrimaryKey(System.Array pKeyInfo, short ordinal) { if (pKeyInfo != null) --- 357,361 ---- } ! private bool IsPrimaryKey(System.Array pKeyInfo, short ordinal) { if (pKeyInfo != null) *************** *** 398,432 **** public String GetName(int i) { ! this.checkIndex(i); ! return this.getName(i); ! } [EditorBrowsable(EditorBrowsableState.Never)] public String GetDataTypeName(int i) { ! this.checkIndex(i); ! return this.getDataTypeName(i); ! } public Type GetFieldType(int i) { ! this.checkIndex(i); ! return this.getFieldType(i); ! } public object GetValue(int i) { ! this.checkPosition(); ! this.checkIndex(i); ! return this.getValue(i); ! } public int GetValues(object[] values) { ! this.checkPosition(); for (int i = 0; i < FieldCount; i++) --- 398,432 ---- public String GetName(int i) { ! this.CheckIndex(i); ! return this.command.Statement.RowDescriptor.Fields[i].FieldName; ! } [EditorBrowsable(EditorBrowsableState.Never)] public String GetDataTypeName(int i) { ! this.CheckIndex(i); ! return this.command.Statement.RowDescriptor.Fields[i].DataType.Name; ! } public Type GetFieldType(int i) { ! this.CheckIndex(i); ! return this.command.Statement.RowDescriptor.Fields[i].DataType.SystemType; ! } public object GetValue(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); ! return this.row[i]; ! } public int GetValues(object[] values) { ! this.CheckPosition(); for (int i = 0; i < FieldCount; i++) *************** *** 445,455 **** } ! return this.getOrdinal(name); ! } ! public bool GetBoolean(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToBoolean(this.GetValue(i)); --- 445,463 ---- } ! for (int i = 0; i < this.command.Statement.RowDescriptor.Fields.Length; i++) ! { ! if (this.CultureAwareCompare(command.Statement.RowDescriptor.Fields[i].FieldName, name)) ! { ! return i; ! } ! } ! return -1; ! } ! ! public bool GetBoolean(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToBoolean(this.GetValue(i)); *************** *** 458,463 **** public byte GetByte(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToByte(this.GetValue(i)); --- 466,471 ---- public byte GetByte(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToByte(this.GetValue(i)); *************** *** 512,517 **** public char GetChar(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToChar(this.GetValue(i)); --- 520,525 ---- public char GetChar(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToChar(this.GetValue(i)); *************** *** 525,530 **** int length) { ! this.checkPosition(); ! this.checkIndex(i); if (buffer == null) --- 533,538 ---- int length) { ! this.CheckPosition(); ! this.CheckIndex(i); if (buffer == null) *************** *** 574,579 **** public Int16 GetInt16(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToInt16(this.GetValue(i)); --- 582,587 ---- public Int16 GetInt16(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToInt16(this.GetValue(i)); *************** *** 582,587 **** public Int32 GetInt32(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToInt32(this.GetValue(i)); --- 590,595 ---- public Int32 GetInt32(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToInt32(this.GetValue(i)); *************** *** 590,595 **** public Int64 GetInt64(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToInt64(this.GetValue(i)); --- 598,603 ---- public Int64 GetInt64(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToInt64(this.GetValue(i)); *************** *** 598,603 **** public float GetFloat(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToSingle(this.GetValue(i)); --- 606,611 ---- public float GetFloat(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToSingle(this.GetValue(i)); *************** *** 606,611 **** public double GetDouble(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToDouble(this.GetValue(i)); --- 614,619 ---- public double GetDouble(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToDouble(this.GetValue(i)); *************** *** 614,619 **** public String GetString(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToString(this.GetValue(i)); --- 622,627 ---- public String GetString(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToString(this.GetValue(i)); *************** *** 622,627 **** public Decimal GetDecimal(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToDecimal(this.GetValue(i)); --- 630,635 ---- public Decimal GetDecimal(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToDecimal(this.GetValue(i)); *************** *** 630,635 **** public DateTime GetDateTime(int i) { ! this.checkPosition(); ! this.checkIndex(i); return Convert.ToDateTime(this.GetValue(i)); --- 638,643 ---- public DateTime GetDateTime(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return Convert.ToDateTime(this.GetValue(i)); *************** *** 638,643 **** public TimeSpan GetTimeSpan(int i) { ! this.checkPosition(); ! this.checkIndex(i); return (TimeSpan)GetValue(i); --- 646,651 ---- public TimeSpan GetTimeSpan(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return (TimeSpan)GetValue(i); *************** *** 646,651 **** public PgPoint GetPgPoint(int i) { ! this.checkPosition(); ! this.checkIndex(i); return (PgPoint)this.GetPgValue(i); --- 654,659 ---- public PgPoint GetPgPoint(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return (PgPoint)this.GetPgValue(i); *************** *** 654,659 **** public PgBox GetPgBox(int i) { ! this.checkPosition(); ! this.checkIndex(i); return (PgBox)this.GetPgValue(i); --- 662,667 ---- public PgBox GetPgBox(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return (PgBox)this.GetPgValue(i); *************** *** 662,667 **** public PgLSeg GetPgLSeg(int i) { ! this.checkPosition(); ! this.checkIndex(i); return (PgLSeg)this.GetPgValue(i); --- 670,675 ---- public PgLSeg GetPgLSeg(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return (PgLSeg)this.GetPgValue(i); *************** *** 670,675 **** public PgCircle GetPgCircle(int i) { ! this.checkPosition(); ! this.checkIndex(i); return (PgCircle)this.GetPgValue(i); --- 678,683 ---- public PgCircle GetPgCircle(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return (PgCircle)this.GetPgValue(i); *************** *** 678,683 **** public PgPath GetPgPath(int i) { ! this.checkPosition(); ! this.checkIndex(i); return (PgPath)this.GetPgValue(i); --- 686,691 ---- public PgPath GetPgPath(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return (PgPath)this.GetPgValue(i); *************** *** 686,691 **** public PgPolygon GetPgPolygon(int i) { ! this.checkPosition(); ! this.checkIndex(i); return (PgPolygon)this.GetPgValue(i); --- 694,699 ---- public PgPolygon GetPgPolygon(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return (PgPolygon)this.GetPgValue(i); *************** *** 694,699 **** public PgTimeSpan GetPgTimeSpan(int i) { ! this.checkPosition(); ! this.checkIndex(i); return new PgTimeSpan(this.GetTimeSpan(i)); --- 702,707 ---- public PgTimeSpan GetPgTimeSpan(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); return new PgTimeSpan(this.GetTimeSpan(i)); *************** *** 702,709 **** public object GetPgValue(int i) { ! this.checkPosition(); ! this.checkIndex(i); ! switch (this.getProviderType(i)) { case PgDbType.Interval: --- 710,717 ---- public object GetPgValue(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); ! switch (this.GetProviderType(i)) { case PgDbType.Interval: *************** *** 711,715 **** default: ! return this.getValue(i); } } --- 719,723 ---- default: ! return this.GetValue(i); } } *************** *** 727,735 **** public bool IsDBNull(int i) { ! this.checkPosition(); ! this.checkIndex(i); ! ! return this.isDBNull(i); ! } #endregion --- 735,750 ---- public bool IsDBNull(int i) { ! this.CheckPosition(); ! this.CheckIndex(i); ! ! bool returnValue = false; ! ! if (this.row[i] == System.DBNull.Value) ! { ! returnValue = true; ! } ! ! return returnValue; ! } #endregion *************** *** 746,750 **** #region Private Methods ! private void checkIndex(int i) { if (i < 0 || i >= this.fieldCount) --- 761,765 ---- #region Private Methods ! private void CheckIndex(int i) { if (i < 0 || i >= this.fieldCount) *************** *** 754,758 **** } ! private void checkPosition() { if (this.position == STARTPOS) --- 769,773 ---- } ! private void CheckPosition() { if (this.position == STARTPOS) *************** *** 762,789 **** } ! private int getOrdinal(string name) ! { ! for (int i = 0; i < this.command.Statement.RowDescriptor.Fields.Length; i++) ! { ! if (this.cultureAwareCompare(command.Statement.RowDescriptor.Fields[i].FieldName, name)) ! { ! return i; ! } ! } ! ! return -1; ! } ! ! private string getName(int i) ! { ! return this.command.Statement.RowDescriptor.Fields[i].FieldName; ! } ! ! private int getSize(int i) { return this.command.Statement.RowDescriptor.Fields[i].DataType.Size; } ! private int getNumericPrecision(int i) { #warning "Add implementation" --- 777,786 ---- } ! private int GetSize(int i) { return this.command.Statement.RowDescriptor.Fields[i].DataType.Size; } ! private int GetNumericPrecision(int i) { #warning "Add implementation" *************** *** 791,795 **** } ! private int getNumericScale(int i) { #warning "Add implementation" --- 788,792 ---- } ! private int GetNumericScale(int i) { #warning "Add implementation" *************** *** 797,821 **** } ! private Type getFieldType(int i) ! { ! return this.command.Statement.RowDescriptor.Fields[i].DataType.SystemType; ! } ! ! private PgDbType getProviderType(int i) { return (PgDbType)this.command.Statement.RowDescriptor.Fields[i].DataType.DataType; } ! private string getDataTypeName(int i) ! { ! return this.command.Statement.RowDescriptor.Fields[i].DataType.Name; ! } ! ! private object getValue(int i) ! { ! return this.row[i]; ! } ! ! private bool isNumeric(int i) { if (i < 0 || i >= this.FieldCount) --- 794,803 ---- } ! private PgDbType GetProviderType(int i) { return (PgDbType)this.command.Statement.RowDescriptor.Fields[i].DataType.DataType; } ! private bool IsNumeric(int i) { if (i < 0 || i >= this.FieldCount) *************** *** 827,831 **** } ! private bool isLong(int i) { if (i < 0 || i >= this.FieldCount) --- 809,813 ---- } ! private bool IsLong(int i) { if (i < 0 || i >= this.FieldCount) *************** *** 837,853 **** } ! private bool isDBNull(int i) ! { ! bool returnValue = false; ! ! if (this.row[i] == System.DBNull.Value) ! { ! returnValue = true; ! } ! ! return returnValue; ! } ! ! private bool isAliased(int i) { /* TODO: Add implementation */ --- 819,823 ---- } ! private bool IsAliased(int i) { /* TODO: Add implementation */ *************** *** 855,859 **** } ! private bool isExpression(int i) { bool returnValue = false; --- 825,829 ---- } ! private bool IsExpression(int i) { bool returnValue = false; *************** *** 868,872 **** } ! private DataTable getSchemaTableStructure() { DataTable schema = new DataTable("Schema"); --- 838,842 ---- } ! private DataTable GetSchemaTableStructure() { DataTable schema = new DataTable("Schema"); *************** *** 896,900 **** } ! private void updateRecordsAffected() { if (this.command != null && !this.command.IsDisposed) --- 866,870 ---- } ! private void UpdateRecordsAffected() { if (this.command != null && !this.command.IsDisposed) *************** *** 908,912 **** } ! private bool cultureAwareCompare(string strA, string strB) { return CultureInfo.CurrentCulture.CompareInfo.Compare( --- 878,882 ---- } ! private bool CultureAwareCompare(string strA, string strB) { return CultureInfo.CurrentCulture.CompareInfo.Compare( Index: PgConnection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgConnection.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** PgConnection.cs 31 May 2004 17:18:57 -0000 1.18 --- PgConnection.cs 22 Jul 2004 10:57:53 -0000 1.19 *************** *** 248,252 **** #endregion ! #region ICloneable MEthods object ICloneable.Clone() --- 248,252 ---- #endregion ! #region ICloneable Methods object ICloneable.Clone() Index: PgCommandBuilder.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommandBuilder.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** PgCommandBuilder.cs 10 Apr 2004 20:15:33 -0000 1.21 --- PgCommandBuilder.cs 22 Jul 2004 10:57:53 -0000 1.22 *************** *** 68,72 **** if (this.dataAdapter != null) { ! this.adapterHandler = new PgRowUpdatingEventHandler(this.rowUpdatingHandler); this.dataAdapter.RowUpdating += this.adapterHandler; } --- 68,72 ---- if (this.dataAdapter != null) { ! this.adapterHandler = new PgRowUpdatingEventHandler(this.RowUpdatingHandler); this.dataAdapter.RowUpdating += this.adapterHandler; } *************** *** 244,248 **** if (this.insertCommand == null) { ! this.buildInsertCommand(null, null); } --- 244,248 ---- if (this.insertCommand == null) { ! this.BuildInsertCommand(null, null); } *************** *** 254,258 **** if (this.updateCommand == null) { ! this.buildUpdateCommand(null, null); } --- 254,258 ---- if (this.updateCommand == null) { ! this.BuildUpdateCommand(null, null); } *************** *** 264,268 **** if (this.deleteCommand == null) { ! this.buildDeleteCommand(null, null); } --- 264,268 ---- if (this.deleteCommand == null) { ! this.BuildDeleteCommand(null, null); } *************** *** 315,319 **** #region Build Command Methods ! private PgCommand buildInsertCommand( DataRow row, DataTableMapping tableMapping) --- 315,319 ---- #region Build Command Methods ! private PgCommand BuildInsertCommand( DataRow row, DataTableMapping tableMapping) *************** *** 323,335 **** StringBuilder values = new StringBuilder(); ! this.buildSchemaTable(); // Create a new command ! this.createCommand(ref this.insertCommand); int i = 1; foreach (DataRow schemaRow in schemaTable.Rows) { ! if (this.isUpdatable(schemaRow, row, tableMapping)) { if (fields.Length > 0) --- 323,335 ---- StringBuilder values = new StringBuilder(); ! this.BuildSchemaTable(); // Create a new command ! this.CreateCommand(ref this.insertCommand); int i = 1; foreach (DataRow schemaRow in schemaTable.Rows) { ! if (this.IsUpdatable(schemaRow, row, tableMapping)) { if (fields.Length > 0) *************** *** 342,346 **** } ! PgParameter parameter = this.createParameter( schemaRow, i, --- 342,346 ---- } ! PgParameter parameter = this.CreateParameter( schemaRow, i, *************** *** 349,353 **** if (row != null && tableMapping != null) { ! DataColumn column = this.getDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, --- 349,353 ---- if (row != null && tableMapping != null) { ! DataColumn column = this.GetDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, *************** *** 363,367 **** // Build Field name and append it to the string ! fields.Append(this.getQuotedIdentifier(schemaRow["BaseColumnName"])); // Build value name and append it to the string --- 363,367 ---- // Build Field name and append it to the string ! fields.Append(this.GetQuotedIdentifier(schemaRow["BaseColumnName"])); // Build value name and append it to the string *************** *** 374,378 **** sql.AppendFormat( this.sqlInsert, ! this.getQuotedIdentifier(tableName), fields.ToString(), values.ToString()); --- 374,378 ---- sql.AppendFormat( this.sqlInsert, ! this.GetQuotedIdentifier(tableName), fields.ToString(), values.ToString()); *************** *** 383,387 **** } ! private PgCommand buildUpdateCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); --- 383,387 ---- } ! private PgCommand BuildUpdateCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); *************** *** 389,393 **** StringBuilder where = new StringBuilder(); ! this.buildSchemaTable(); if (!this.hasPrimaryKey && !this.hasUniqueKey) --- 389,393 ---- StringBuilder where = new StringBuilder(); ! this.BuildSchemaTable(); if (!this.hasPrimaryKey && !this.hasUniqueKey) *************** *** 397,406 **** // Create a new command ! this.createCommand(ref this.updateCommand); int i = 1; foreach (DataRow schemaRow in schemaTable.Rows) { ! if (this.isUpdatable(schemaRow, row, tableMapping)) { if (sets.Length > 0) --- 397,406 ---- // Create a new command ! this.CreateCommand(ref this.updateCommand); int i = 1; foreach (DataRow schemaRow in schemaTable.Rows) { ! if (this.IsUpdatable(schemaRow, row, tableMapping)) { if (sets.Length > 0) *************** *** 409,423 **** } ! PgParameter parameter = this.createParameter(schemaRow, i, false); // Build Field name and append it to the string sets.AppendFormat( this.setClausule, ! this.getQuotedIdentifier(schemaRow["BaseColumnName"]), parameter.ParameterName); if (row != null && tableMapping != null) { ! DataColumn column = this.getDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, --- 409,423 ---- } ! PgParameter parameter = this.CreateParameter(schemaRow, i, false); // Build Field name and append it to the string sets.AppendFormat( this.setClausule, ! this.GetQuotedIdentifier(schemaRow["BaseColumnName"]), parameter.ParameterName); if (row != null && tableMapping != null) { ! DataColumn column = this.GetDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, *************** *** 439,443 **** foreach (DataRow schemaRow in schemaTable.Rows) { ! if (this.includedInWhereClause(schemaRow)) { if (where.Length > 0) --- 439,443 ---- foreach (DataRow schemaRow in schemaTable.Rows) { ! if (this.IncludedInWhereClause(schemaRow)) { if (where.Length > 0) *************** *** 446,452 **** } ! string quotedId = this.getQuotedIdentifier(schemaRow["BaseColumnName"]); ! PgParameter parameter = this.createParameter(schemaRow, i, true); where.AppendFormat( --- 446,452 ---- } ! string quotedId = this.GetQuotedIdentifier(schemaRow["BaseColumnName"]); ! PgParameter parameter = this.CreateParameter(schemaRow, i, true); where.AppendFormat( *************** *** 457,461 **** if (row != null && tableMapping != null) { ! DataColumn column = this.getDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, --- 457,461 ---- if (row != null && tableMapping != null) { ! DataColumn column = this.GetDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, *************** *** 476,480 **** sql.AppendFormat( this.sqlUpdate, ! this.getQuotedIdentifier(tableName), sets.ToString(), where.ToString()); --- 476,480 ---- sql.AppendFormat( this.sqlUpdate, ! this.GetQuotedIdentifier(tableName), sets.ToString(), where.ToString()); *************** *** 485,489 **** } ! private PgCommand buildDeleteCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); --- 485,489 ---- } ! private PgCommand BuildDeleteCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); *************** *** 491,495 **** string dsColumnName = String.Empty; ! this.buildSchemaTable(); if (!this.hasPrimaryKey && !this.hasUniqueKey) --- 491,495 ---- string dsColumnName = String.Empty; ! this.BuildSchemaTable(); if (!this.hasPrimaryKey && !this.hasUniqueKey) *************** *** 499,503 **** // Create a new command ! this.createCommand(ref this.deleteCommand); // Build where clausule --- 499,503 ---- // Create a new command ! this.CreateCommand(ref this.deleteCommand); // Build where clausule *************** *** 505,509 **** foreach (DataRow schemaRow in schemaTable.Rows) { ! if (this.includedInWhereClause(schemaRow)) { if (where.Length > 0) --- 505,509 ---- foreach (DataRow schemaRow in schemaTable.Rows) { ! if (this.IncludedInWhereClause(schemaRow)) { if (where.Length > 0) *************** *** 512,518 **** } ! string quotedId = this.getQuotedIdentifier(schemaRow["BaseColumnName"]); ! PgParameter parameter = this.createParameter(schemaRow, i, true); where.AppendFormat( --- 512,518 ---- } ! string quotedId = this.GetQuotedIdentifier(schemaRow["BaseColumnName"]); ! PgParameter parameter = this.CreateParameter(schemaRow, i, true); where.AppendFormat( *************** *** 523,527 **** if (row != null && tableMapping != null) { ! DataColumn column = this.getDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, --- 523,527 ---- if (row != null && tableMapping != null) { ! DataColumn column = this.GetDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, *************** *** 542,546 **** sql.AppendFormat( this.sqlDelete, ! this.getQuotedIdentifier(tableName), where.ToString()); --- 542,546 ---- sql.AppendFormat( this.sqlDelete, ! this.GetQuotedIdentifier(tableName), where.ToString()); *************** *** 550,554 **** } ! private PgParameter createParameter( DataRow schemaRow, int index, --- 550,554 ---- } ! private PgParameter CreateParameter( DataRow schemaRow, int index, *************** *** 580,584 **** } ! private bool isUpdatable( DataRow schemaRow, DataRow row, --- 580,584 ---- } ! private bool IsUpdatable( DataRow schemaRow, DataRow row, *************** *** 587,591 **** if (row != null && tableMapping != null) { ! DataColumn column = this.getDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, --- 587,591 ---- if (row != null && tableMapping != null) { ! DataColumn column = this.GetDataColumn( schemaRow["BaseColumnName"].ToString(), tableMapping, *************** *** 629,633 **** } ! private bool includedInWhereClause(DataRow schemaRow) { PgDbType pgDbType = (PgDbType)schemaRow["ProviderType"]; --- 629,633 ---- } ! private bool IncludedInWhereClause(DataRow schemaRow) { PgDbType pgDbType = (PgDbType)schemaRow["ProviderType"]; *************** *** 651,655 **** } ! private void buildSchemaTable() { bool mustClose = false; --- 651,655 ---- } ! private void BuildSchemaTable() { bool mustClose = false; *************** *** 678,682 **** reader.Close(); ! this.checkSchemaTable(); } catch --- 678,682 ---- reader.Close(); ! this.CheckSchemaTable(); } catch *************** *** 694,698 **** } ! private void checkSchemaTable() { tableName = String.Empty; --- 694,698 ---- } ! private void CheckSchemaTable() { tableName = String.Empty; *************** *** 722,731 **** } ! private string getQuotedIdentifier(object identifier) { return quotePrefix + identifier.ToString() + quoteSuffix; } ! private void createCommand(ref PgCommand command) { if (command == null) --- 722,731 ---- } ! private string GetQuotedIdentifier(object identifier) { return quotePrefix + identifier.ToString() + quoteSuffix; } ! private void CreateCommand(ref PgCommand command) { if (command == null) *************** *** 741,745 **** } ! private DataColumn getDataColumn( string columnName, DataTableMapping tableMapping, --- 741,745 ---- } ! private DataColumn GetDataColumn( string columnName, DataTableMapping tableMapping, *************** *** 770,774 **** #region Event Handler Methods ! private void rowUpdatingHandler(object sender, PgRowUpdatingEventArgs e) { if (e.Status != UpdateStatus.Continue) --- 770,774 ---- #region Event Handler Methods ! private void RowUpdatingHandler(object sender, PgRowUpdatingEventArgs e) { if (e.Status != UpdateStatus.Continue) *************** *** 811,823 **** { case StatementType.Insert: ! e.Command = this.buildInsertCommand(e.Row, e.TableMapping); break; case StatementType.Update: ! e.Command = this.buildUpdateCommand(e.Row, e.TableMapping); break; case StatementType.Delete: ! e.Command = this.buildDeleteCommand(e.Row, e.TableMapping); break; } --- 811,823 ---- { case StatementType.Insert: ! e.Command = this.BuildInsertCommand(e.Row, e.TableMapping); break; case StatementType.Update: ! e.Command = this.BuildUpdateCommand(e.Row, e.TableMapping); break; case StatementType.Delete: ! e.Command = this.BuildDeleteCommand(e.Row, e.TableMapping); break; } |
From: Carlos G. Á. <car...@us...> - 2004-07-22 10:57:39
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20056 Modified Files: PgParameter.cs PgParameterCollection.cs PgRowUpdatedEventArgs.cs PgRowUpdatingEventArgs.cs PgTransaction.cs Log Message: 2004-07-22 Carlos Guzman Alvarez <car...@te...> * USe PascalCase naming for private methods in all classes. Index: PgRowUpdatingEventArgs.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgRowUpdatingEventArgs.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PgRowUpdatingEventArgs.cs 9 Feb 2004 14:19:22 -0000 1.2 --- PgRowUpdatingEventArgs.cs 22 Jul 2004 10:57:30 -0000 1.3 *************** *** 24,37 **** { public sealed class PgRowUpdatingEventArgs : RowUpdatingEventArgs ! { ! public PgRowUpdatingEventArgs(DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) : base(row, command, statementType, tableMapping) { } ! new public PgCommand Command { get { return (PgCommand)base.Command; } set { base.Command = value; } } } } --- 24,45 ---- { public sealed class PgRowUpdatingEventArgs : RowUpdatingEventArgs ! { ! #region Constructors ! ! public PgRowUpdatingEventArgs(DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) : base(row, command, statementType, tableMapping) { } ! #endregion ! ! #region Properties ! ! public new PgCommand Command { get { return (PgCommand)base.Command; } set { base.Command = value; } } + + #endregion } } Index: PgParameterCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgParameterCollection.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PgParameterCollection.cs 10 Apr 2004 21:35:36 -0000 1.8 --- PgParameterCollection.cs 22 Jul 2004 10:57:30 -0000 1.9 *************** *** 160,164 **** foreach (PgParameter item in this.parameters) { ! if (this.cultureAwareCompare(item.ParameterName, parameterName)) { return index; --- 160,164 ---- foreach (PgParameter item in this.parameters) { ! if (this.CultureAwareCompare(item.ParameterName, parameterName)) { return index; *************** *** 253,257 **** } ! private bool cultureAwareCompare(string strA, string strB) { return CultureInfo.CurrentCulture.CompareInfo.Compare( --- 253,261 ---- } ! #endregion ! ! #region Private Methods ! ! private bool CultureAwareCompare(string strA, string strB) { return CultureInfo.CurrentCulture.CompareInfo.Compare( Index: PgParameter.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgParameter.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PgParameter.cs 10 Apr 2004 21:35:36 -0000 1.12 --- PgParameter.cs 22 Jul 2004 10:57:30 -0000 1.13 *************** *** 88,92 **** { get { return this.PgDbTypeToDbType(this.pgDbType); } ! set { this.pgDbType = this.dbTypeToPgType(value); } } --- 88,92 ---- { get { return this.PgDbTypeToDbType(this.pgDbType); } ! set { this.pgDbType = this.DbTypeToPgType(value); } } *************** *** 149,153 **** if (this.inferType) { ! this.setPgTypeFromValue(this.value); } } --- 149,153 ---- if (this.inferType) { ! this.SetPgTypeFromValue(this.value); } } *************** *** 387,391 **** #region Private Methods ! private void setPgTypeFromValue(object value) { if (value == null) --- 387,391 ---- #region Private Methods ! private void SetPgTypeFromValue(object value) { if (value == null) *************** *** 505,509 **** } ! private PgDbType dbTypeToPgType(DbType dbType) { switch(dbType) --- 505,509 ---- } ! private PgDbType DbTypeToPgType(DbType dbType) { switch(dbType) Index: PgRowUpdatedEventArgs.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgRowUpdatedEventArgs.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PgRowUpdatedEventArgs.cs 9 Feb 2004 14:19:22 -0000 1.2 --- PgRowUpdatedEventArgs.cs 22 Jul 2004 10:57:30 -0000 1.3 *************** *** 24,36 **** { public sealed class PgRowUpdatedEventArgs : RowUpdatedEventArgs ! { ! public PgRowUpdatedEventArgs(DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) : base(row, command, statementType, tableMapping) { ! } ! ! new public PgCommand Command { get { return (PgCommand)base.Command; } ! } ! } } --- 24,44 ---- { public sealed class PgRowUpdatedEventArgs : RowUpdatedEventArgs ! { ! #region Constructors ! ! public PgRowUpdatedEventArgs(DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) : base(row, command, statementType, tableMapping) { ! } ! ! #endregion ! ! #region Properties ! ! public new PgCommand Command { get { return (PgCommand)base.Command; } ! } ! ! #endregion ! } } Index: PgTransaction.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTransaction.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PgTransaction.cs 10 Apr 2004 21:35:36 -0000 1.7 --- PgTransaction.cs 22 Jul 2004 10:57:30 -0000 1.8 *************** *** 191,197 **** throw new PgException(ex.Message, ex); } ! } ! internal void InternalBeginTransaction() { try --- 191,201 ---- throw new PgException(ex.Message, ex); } ! } ! #endregion ! ! #region Internal methods ! ! internal void InternalBeginTransaction() { try |
From: Carlos G. Á. <car...@us...> - 2004-07-21 11:03:40
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32366 Modified Files: changelog.txt changes.txt Log Message: Prepare for beta 7 Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** changelog.txt 12 Jun 2004 14:20:24 -0000 1.121 --- changelog.txt 21 Jul 2004 11:03:30 -0000 1.122 *************** *** 85,89 **** - 2004-04-10 Carlos Guzman Alvarez <car...@te...> --- 85,88 ---- Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** changes.txt 20 Jul 2004 18:42:07 -0000 1.17 --- changes.txt 21 Jul 2004 11:03:30 -0000 1.18 *************** *** 8,11 **** --- 8,20 ---- * Bug fixes (please review the changelog for details) + * Better fit to ADO.NET + + * Improved SSL/TLS support. + + * Time and timestamp data types are now handled as strings. + + * Improved named parameters support. + + * Improved Command Builder and Data Reader classes. |
From: Carlos G. Á. <car...@us...> - 2004-07-21 11:00:48
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31658 Modified Files: PgOutputPacket.cs Log Message: Prepare for beta 7 Index: PgOutputPacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgOutputPacket.cs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** PgOutputPacket.cs 20 Jul 2004 18:41:43 -0000 1.27 --- PgOutputPacket.cs 21 Jul 2004 11:00:38 -0000 1.28 *************** *** 114,118 **** byte[] buffer = BitConverter.GetBytes(val); ! this.Write(BitConverter.ToInt64(buffer, 0)); } --- 114,118 ---- byte[] buffer = BitConverter.GetBytes(val); ! this.WriteLong(BitConverter.ToInt64(buffer, 0)); } *************** *** 323,328 **** case PgDataType.Double: packet.WriteInt(size); ! packet.WriteDouble(Convert.ToDouble(value)); ! break; case PgDataType.Float: --- 323,328 ---- case PgDataType.Double: packet.WriteInt(size); ! packet.WriteDouble(Convert.ToDouble(value)); ! break; case PgDataType.Float: |
From: Carlos G. Á. <car...@us...> - 2004-07-21 08:23:23
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10365 Modified Files: PgSqlClient.build Log Message: Updated build file Index: PgSqlClient.build =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.build,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PgSqlClient.build 14 Jun 2004 15:00:27 -0000 1.15 --- PgSqlClient.build 21 Jul 2004 08:23:14 -0000 1.16 *************** *** 20,51 **** <property name="nunit.test.dir" value="PostgreSql.Data.PgSqlClient.UnitTests\source"/> - <!-- Check for Html Help Compiler --> - <target name="check-htmlhelp-compiler"> - <ifnot propertyexists="htmlhelp.compiler"> - <readregistry property="htmlhelp.workshop.installroot" key="SOFTWARE\Microsoft\HTML Help Workshop\InstallDir" - hive="CurrentUser" failonerror="false" /> - <if propertyexists="htmlhelp.workshop.installroot"> - <property name="htmlhelp.compiler" value="${htmlhelp.workshop.installroot}\hhc.exe" readonly="false" /> - </if> - </ifnot> - <ifnot propertyexists="htmlhelp.compiler"> - <sysinfo /> - <property name="htmlhelp.compiler" value="${sys.os.folder.programfiles}\HTML Help Workshop\hhc.exe" - readonly="false" /> - </ifnot> - </target> - <!-- Check for NUnit --> ! <target name="check-nunit-framework" depends="check-htmlhelp-compiler"> ! <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> </target> <!-- Target for check build configuration --> <target name="check-build-config" depends="clean"> - <call target="check-htmlhelp-compiler" /> <call target="check-nunit-framework" /> </target> --- 20,36 ---- <property name="nunit.test.dir" value="PostgreSql.Data.PgSqlClient.UnitTests\source"/> <!-- Check for NUnit --> ! <target name="check-nunit-framework"> ! <if test="${not property::exists('nunit.framework.dll')}"> ! <sysinfo /> ! <property ! name="nunit.framework.dll" ! value="${sys.os.folder.programfiles}\NUnit 2.2\bin\nunit.framework.dll" readonly="false" /> ! </if> </target> <!-- Target for check build configuration --> <target name="check-build-config" depends="clean"> <call target="check-nunit-framework" /> </target> *************** *** 71,135 **** <!-- Build target for all existing platforms --> <target name="build-all" depends="check-build-config"> ! <call target="net-1.0" failonerror="false" /> ! <call target="net-1.1" failonerror="false" /> ! <call target="mono-1.0" failonerror="false" /> </target> <target name="net-1.0"> <!-- .NET Framework 1.0 --> ! <available type="Framework" resource="net-1.0" property="temp.framework.available" /> ! <ifnot propertytrue="temp.framework.available"> ! <echo message=".NET Framework 1.0 runtime is not available." /> ! </ifnot> ! <if propertytrue="temp.framework.available"> ! <property name="nant.settings.currentframework" value="net-1.0" /> ! <echo message="Building using .NET Framework 1.0." /> ! <call target="build-provider" force="true" /> ! <if propertyexists="htmlhelp.compiler"> ! <!-- call target="build-sdk" force="true" /--> ! </if> ! <if propertyexists="nunit.framework.dll"> ! <call target="build-nunit-tests" force="true" /> ! </if> ! <call target="distribution" force="true" /> </if> </target> <target name="net-1.1"> <!-- .NET Framework 1.1 --> ! <available type="Framework" resource="net-1.1" property="temp.framework.available" /> ! <ifnot propertytrue="temp.framework.available"> ! <echo message=".NET Framework 1.1 runtime is not available." /> ! </ifnot> ! <if propertytrue="temp.framework.available"> ! <property name="nant.settings.currentframework" value="net-1.1" /> ! <echo message="Building using .NET Framework 1.1." /> ! <call target="build-provider" force="true" /> ! <if propertyexists="htmlhelp.compiler"> ! <!-- call target="build-sdk" force="true" /--> ! </if> ! <if propertyexists="nunit.framework.dll"> ! <call target="build-nunit-tests" force="true" /> ! </if> ! <call target="distribution" force="true" /> </if> </target> ! <target name="mono-1.0"> ! <!-- Mono 1.0 --> ! <available type="Framework" resource="mono-1.0" property="temp.framework.available" /> ! <ifnot propertytrue="temp.framework.available"> ! <echo message="Mono 1.0 runtime is not available." /> ! </ifnot> ! <if propertytrue="temp.framework.available"> ! <property name="nant.settings.currentframework" value="mono-1.0" /> ! <echo message="Building using Mono 1.0." /> ! <property name="build.define" value="_MONO"/> ! <call target="build-provider-mono" force="true" /> </if> </target> ! <!-- Taget for build TLS Assembly (Microsoft .NET) --> <target name="build-tls"> <property name="build.dir" value="${base.build.dir}\${nant.settings.currentframework}" /> --- 56,121 ---- <!-- Build target for all existing platforms --> <target name="build-all" depends="check-build-config"> ! <!-- Build --> ! <if test="${framework::exists('net-1.0')}"> ! <call target="net-1.0"/> ! </if> ! <if test="${framework::exists('net-1.1')}"> ! <call target="net-1.1"/> ! </if> ! <if test="${framework::exists('net-2.0')}"> ! <call target="net-2.0"/> ! </if> ! <if test="${framework::exists('mono-1.0')}"> ! <call target="mono-1.0"/> ! </if> </target> <target name="net-1.0"> <!-- .NET Framework 1.0 --> ! <property name="nant.settings.currentframework" value="net-1.0" /> ! ! <echo message="Build using .NET Framework 1.0." /> ! <call target="build-provider"/> ! <if test="${property::exists('nunit.framework.dll')}"> ! <call target="build-nunit-tests"/> </if> + <call target="distribution"/> </target> <target name="net-1.1"> <!-- .NET Framework 1.1 --> ! <property name="nant.settings.currentframework" value="net-1.1" /> ! ! <echo message="Build using .NET Framework 1.1." /> ! <call target="build-provider"/> ! <if test="${property::exists('nunit.framework.dll')}"> ! <call target="build-nunit-tests"/> </if> + <call target="distribution"/> </target> ! <target name="net-2.0"> ! <!-- .NET Framework 2.0 --> ! <property name="nant.settings.currentframework" value="net-2.0" /> ! ! <echo message="Build using .NET Framework 2.0." /> ! <call target="build-provider"/> ! <if test="${property::exists('nunit.framework.dll')}"> ! <call target="build-nunit-tests"/> </if> + <call target="distribution"/> </target> + <target name="mono-1.0"> + <!-- mono:: 1.0 --> + <property name="nant.settings.currentframework" value="mono-1.0" /> + + <property name="build.define" value="${build.define};_MONO"/> + + <echo message="Build using mono:: 1.0." /> + <call target="build-provider-mono"/> + </target> ! <!-- Target for build TLS Assembly (Microsoft .NET) --> <target name="build-tls"> <property name="build.dir" value="${base.build.dir}\${nant.settings.currentframework}" /> *************** *** 140,144 **** <csc output="${build.dir}\Mono.Security.Protocol.Tls.dll" target="library" define="${build.define}"> <sources> ! <includes name="${tls.src.dir}/**/*.cs" /> </sources> <references> --- 126,130 ---- <csc output="${build.dir}\Mono.Security.Protocol.Tls.dll" target="library" define="${build.define}"> <sources> ! <include name="${tls.src.dir}/**/*.cs" /> </sources> <references> *************** *** 160,164 **** <csc output="${build.dir}\${project.FormalName}.dll" target="library" define="${build.define}" debug="${build.debug}"> <sources> ! <includes name="${src.dir}/**/*.cs" /> </sources> <references> --- 146,150 ---- <csc output="${build.dir}\${project.FormalName}.dll" target="library" define="${build.define}" debug="${build.debug}"> <sources> ! <include name="${src.dir}/**/*.cs" /> </sources> <references> *************** *** 168,172 **** <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" /> --- 154,158 ---- <absolute file="System.Drawing.dll" /> <absolute file="System.XML.dll" /> ! <include name="${build.dir}/Mono.Security.Protocol.Tls.dll" /> </references> <arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp" /> *************** *** 186,197 **** <csc output="${build.dir}\Mono.Security.Tls.dll" target="library" define="${build.define}"> <sources> ! <includes name="${tls.src.dir}/**/*.cs" /> </sources> <references> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Drawing.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" /> </references> <arg value="/optimize+" /> --- 172,183 ---- <csc output="${build.dir}\Mono.Security.Tls.dll" target="library" define="${build.define}"> <sources> ! <include name="${tls.src.dir}/**/*.cs" /> </sources> <references> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Drawing.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" /> </references> <arg value="/optimize+" /> *************** *** 207,219 **** <csc output="${build.dir}\${project.FormalName}.dll" target="library" define="${build.define}"> <sources> ! <includes name="${src.dir}/**/*.cs" /> </sources> <references> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Design.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Drawing.dll" /> ! <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/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" /> --- 193,206 ---- <csc output="${build.dir}\${project.FormalName}.dll" target="library" define="${build.define}"> <sources> ! <include name="${src.dir}/**/*.cs" /> </sources> + <references> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Design.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Drawing.dll" /> ! <include name="${nant.settings.currentframework.frameworkassemblydirectory}/System.XML.dll" /> ! <include name="${build.dir}/Mono.Security.Tls.dll" /> </references> <arg value="/resource:${resources.dir}\Toolbox\PgConnection.bmp,PostgreSql.Data.PgSqlClient.Resources.ToolBox.PgConnection.bmp" /> *************** *** 224,240 **** </target> ! <!-- Target for build csUnit Tests --> <target name="build-nunit-tests"> <property name="build.dir" value="${base.build.dir}\${nant.settings.currentframework}" /> <copy todir="${build.dir}"> ! <fileset basedir="${nunit.test.dir}"> ! <includes name="*.config" /> </fileset> </copy> <!-- compile PostgreSql.Data.PgSqlClient.Tests --> <csc output="${build.dir}\${project.FormalName}.UnitTests.dll" target="library"> <sources> ! <includes name="${nunit.test.dir}/**/*.cs" /> </sources> <references> --- 211,228 ---- </target> ! <!-- Target for build NUnit Test Suite --> <target name="build-nunit-tests"> <property name="build.dir" value="${base.build.dir}\${nant.settings.currentframework}" /> <copy todir="${build.dir}"> ! <fileset basedir="${nunit.test.dir}/.."> ! <include name="*.config" /> </fileset> </copy> + <!-- compile PostgreSql.Data.PgSqlClient.Tests --> <csc output="${build.dir}\${project.FormalName}.UnitTests.dll" target="library"> <sources> ! <include name="${nunit.test.dir}/**/*.cs" /> </sources> <references> *************** *** 242,247 **** <absolute file="System.Data.dll" /> <absolute file="System.XML.dll" /> ! <includes name="${nunit.framework.dll}"/> ! <includes name="${build.dir}/${project.FormalName}.dll" /> </references> <arg value="/optimize+" /> --- 230,235 ---- <absolute file="System.Data.dll" /> <absolute file="System.XML.dll" /> ! <include name="${nunit.framework.dll}"/> ! <include name="${build.dir}/${project.FormalName}.dll" /> </references> <arg value="/optimize+" /> *************** *** 255,269 **** <mkdir dir="${distribution.dir}" failonerror="false" /> ! <!-- Copy needed files to distribution directory --> <copy todir="${distribution.dir}"> <fileset basedir="${build.dir}"> ! <includes name="*.dll" /> ! <includes name="*.config" /> </fileset> </copy> <copy todir="${distribution.dir}"> <fileset basedir="."> ! <includes name="*.txt" /> ! <includes name="*.html" /> </fileset> </copy> --- 243,259 ---- <mkdir dir="${distribution.dir}" failonerror="false" /> ! ! <!-- Copy needed files to distribution directory --> <copy todir="${distribution.dir}"> <fileset basedir="${build.dir}"> ! <include name="*.dll" /> ! <include name="*.config" /> </fileset> </copy> + <copy todir="${distribution.dir}"> <fileset basedir="."> ! <include name="*.txt" /> ! <include name="*.html" /> </fileset> </copy> |
From: Carlos G. Á. <car...@us...> - 2004-07-21 08:05:41
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7787 Modified Files: Build.bat Log Message: Prepare for beta 7 Index: Build.bat =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Build.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Build.bat 8 Feb 2004 22:24:37 -0000 1.2 --- Build.bat 21 Jul 2004 08:05:32 -0000 1.3 *************** *** 1,2 **** ! nant -buildfile:PgSqlClient.build -verbose %1 %2 %3 %4 pause --- 1,2 ---- ! nant -buildfile:PgSqlClient.build %1 %2 %3 %4 pause |
From: Carlos G. Á. <car...@us...> - 2004-07-21 08:03:39
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7534 Modified Files: PgDbClient.cs Log Message: Removed non-valid using Index: PgDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** PgDbClient.cs 20 Jul 2004 18:41:43 -0000 1.50 --- PgDbClient.cs 21 Jul 2004 08:03:30 -0000 1.51 *************** *** 23,27 **** using System.Text; using System.Net; - using System.Net.Security; using System.Net.Sockets; --- 23,26 ---- |
From: Carlos G. Á. <car...@us...> - 2004-07-21 07:57:16
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/WindowsSetup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6381 Modified Files: PgSqlClientSetup.gi2 Log Message: Prepare for beta 7 Index: PgSqlClientSetup.gi2 =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/WindowsSetup/PgSqlClientSetup.gi2,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PgSqlClientSetup.gi2 8 Mar 2004 17:22:53 -0000 1.8 --- PgSqlClientSetup.gi2 21 Jul 2004 07:57:07 -0000 1.9 *************** *** 9,24 **** <file src="..\build\net-1.1\distribution\Mono.Security.Protocol.Tls.dll" dst="%GAC%\Mono.Security.Protocol.Tls.dll" /> </files> <shortcuts> <shortcut name="%ProgramsMenu%\%ProgramGroup%\Uninstall %AppName%" cmdline="%InstallPath%\Uninstall.exe" /> </shortcuts> </component> - <!--component id="Help" name="Help"> - <files> - <file src="..\build\net-1.0\distribution\*.chm" dst="%InstallPath%\*.*" /> - </files> - <shortcuts> - <shortcut name="%ProgramsMenu%\%ProgramGroup%\SDK" cmdline="%InstallPath%\PgSqlClientSDK.chm" /> - </shortcuts> - </component --> <component id="License" name="License"> <files> --- 9,24 ---- <file src="..\build\net-1.1\distribution\Mono.Security.Protocol.Tls.dll" dst="%GAC%\Mono.Security.Protocol.Tls.dll" /> </files> + <registry> + <reg + key="HKLM\Software\Microsoft\.NETFramework\AssemblyFolders\PostgreSql.Data.PgSqlClient" + value="%InstallPath%" + type="str" + action="add" + /> + </registry> <shortcuts> <shortcut name="%ProgramsMenu%\%ProgramGroup%\Uninstall %AppName%" cmdline="%InstallPath%\Uninstall.exe" /> </shortcuts> </component> <component id="License" name="License"> <files> *************** *** 102,106 **** <variables> <var name="AppID" value="PgSqlClient ADO.NET Data Provider 1.0" /> ! <var name="AppName" value="PgSqlClient ADO.NET Data Provider 1.0 Beta 6" /> <var name="OutputPath" value="Output" type="normal"/> <var name="Password" type="normal"/> --- 102,106 ---- <variables> <var name="AppID" value="PgSqlClient ADO.NET Data Provider 1.0" /> ! <var name="AppName" value="PgSqlClient ADO.NET Data Provider 1.0 Beta 7" /> <var name="OutputPath" value="Output" type="normal"/> <var name="Password" type="normal"/> |
From: Carlos G. Á. <car...@us...> - 2004-07-21 07:53:42
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5942 Modified Files: SslClientStream.cs SslServerStream.cs Log Message: Changed instantiation of read/write lock objects (Thanks to Sebastien Pouliot) Index: SslServerStream.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SslServerStream.cs 26 Apr 2004 09:18:45 -0000 1.12 --- SslServerStream.cs 21 Jul 2004 07:53:33 -0000 1.13 *************** *** 286,291 **** this.innerStream = stream; this.ownsStream = ownsStream; ! this.read = String.Empty; ! this.write = String.Empty; this.protocol = new ServerRecordProtocol(innerStream, context); } --- 286,291 ---- this.innerStream = stream; this.ownsStream = ownsStream; ! this.read = new object(); ! this.write = new object(); this.protocol = new ServerRecordProtocol(innerStream, context); } Index: SslClientStream.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** SslClientStream.cs 21 Apr 2004 12:49:18 -0000 1.21 --- SslClientStream.cs 21 Jul 2004 07:53:33 -0000 1.22 *************** *** 329,335 **** this.innerStream = stream; this.ownsStream = ownsStream; ! this.read = String.Empty; ! this.write = String.Empty; ! this.protocol = new ClientRecordProtocol(innerStream, context); } --- 329,335 ---- this.innerStream = stream; this.ownsStream = ownsStream; ! this.read = new object(); ! this.write = new object(); ! this.protocol = new ClientRecordProtocol(innerStream, context); } |
From: Carlos G. Á. <car...@us...> - 2004-07-20 18:42:23
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31774 Modified Files: changes.txt Log Message: Prepare for beta 7 Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** changes.txt 8 Mar 2004 17:23:22 -0000 1.16 --- changes.txt 20 Jul 2004 18:42:07 -0000 1.17 *************** *** 2,5 **** --- 2,13 ---- ------------------------------------------------------- + + Beta 7 ( 21-07-2004 ) + ---- - - -- -- ---- - + + * Bug fixes (please review the changelog for details) + + + Beta 6 ( 08-03-2004 ) ---- - - -- -- ---- - |
From: Carlos G. Á. <car...@us...> - 2004-07-20 18:41:54
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31634 Modified Files: PgCodes.cs PgDbClient.cs PgFieldDescriptor.cs PgOutputPacket.cs PgResponsePacket.cs PgStatement.cs PgType.cs PgTypeCollection.cs Log Message: Prepare for beta 7 Index: PgResponsePacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgResponsePacket.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PgResponsePacket.cs 3 Jun 2004 16:37:20 -0000 1.26 --- PgResponsePacket.cs 20 Jul 2004 18:41:43 -0000 1.27 *************** *** 139,143 **** } ! public override string ReadString() { int length = this.ReadInt(); --- 139,143 ---- } ! public new string ReadString() { int length = this.ReadInt(); *************** *** 175,185 **** { return BitConverter.ToSingle(BitConverter.GetBytes(this.ReadInt()), 0); - - /* - FloatLayout floatValue = new FloatLayout(); - floatValue.i0 = IPAddress.HostToNetworkOrder(base.ReadInt32()); - - return floatValue.f; - */ } --- 175,178 ---- *************** *** 193,212 **** public override double ReadDouble() { ! return BitConverter.ToDouble(BitConverter.GetBytes(this.ReadLong()), 0); ! ! /* ! DoubleLayout doubleValue = new DoubleLayout(); ! int temp; ! ! doubleValue.d = base.ReadDouble(); ! doubleValue.i0 = IPAddress.HostToNetworkOrder(doubleValue.i0); ! doubleValue.i4 = IPAddress.HostToNetworkOrder(doubleValue.i4); ! ! temp = doubleValue.i0; ! doubleValue.i0 = doubleValue.i4; ! doubleValue.i4 = temp; ! ! return doubleValue.d; ! */ } --- 186,192 ---- public override double ReadDouble() { ! byte[] buffer = BitConverter.GetBytes(this.ReadLong()); ! ! return BitConverter.ToDouble(buffer, 0); } *************** *** 234,294 **** } ! public DateTime ReadTime() { ! double seconds = this.ReadDouble(); ! ! return PgCodes.BASE_DATE.AddSeconds(seconds); } ! public DateTime ReadTimeWithTZ() { ! DateTime time = this.ReadTime(); ! int timezone = (-1)*(this.ReadInt()/3600); ! ! string sbFormat = "{0:D2}{1}{2:D2}{3}{4:D2}{5:D2}"; ! ! if (timezone >= 0) ! { ! sbFormat = "{0:D2}{1}{2:D2}{3}{4:D2}+{5:D2}"; ! } ! ! StringBuilder timeWithTZ = new StringBuilder(); ! timeWithTZ.AppendFormat( ! sbFormat, ! time.Hour, ! CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator, ! time.Minute, ! CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator, ! time.Second, ! timezone); ! ! StringBuilder format = new StringBuilder(); ! format.AppendFormat( ! "{0}{1}{2}{3}{4}{5}", ! "HH", ! CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator, ! "mm", ! CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator, ! "ss", ! "zz"); ! ! return DateTime.ParseExact( ! timeWithTZ.ToString(), ! format.ToString(), ! CultureInfo.CurrentCulture.DateTimeFormat, ! DateTimeStyles.NoCurrentDateDefault | ! DateTimeStyles.AllowWhiteSpaces); } ! public DateTime ReadTimestamp() ! { ! double seconds = this.ReadDouble(); ! ! return PgCodes.BASE_DATE.AddSeconds(seconds); } ! public DateTime ReadTimestampWithTZ() ! { ! return this.ReadTimestamp(); } --- 214,235 ---- } ! public DateTime ReadTime(int length) { ! return DateTime.Parse(this.ReadString(length)); } ! public DateTime ReadTimeWithTZ(int length) { ! return DateTime.Parse(this.ReadString(length)); } ! public DateTime ReadTimestamp(int length) ! { ! return DateTime.Parse(this.ReadString(length)); } ! public DateTime ReadTimestampWithTZ(int length) ! { ! return DateTime.Parse(this.ReadString(length)); } *************** *** 476,494 **** case PgDataType.Date: ! return this.ReadDate(); case PgDataType.Time: ! return this.ReadTime(); case PgDataType.TimeWithTZ: ! return this.ReadTimeWithTZ(); ! case PgDataType.Timestamp: ! return this.ReadTimestamp(); ! case PgDataType.TimestampWithTZ: ! return this.ReadTimestampWithTZ(); ! case PgDataType.Point: return this.ReadPoint(); --- 417,435 ---- case PgDataType.Date: ! return this.ReadDate(); case PgDataType.Time: ! return this.ReadTime(length); case PgDataType.TimeWithTZ: ! return this.ReadTimeWithTZ(length); ! case PgDataType.Timestamp: ! return this.ReadTimestamp(length); ! case PgDataType.TimestampWithTZ: ! return this.ReadTimestampWithTZ(length); ! case PgDataType.Point: return this.ReadPoint(); Index: PgTypeCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgTypeCollection.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PgTypeCollection.cs 10 Apr 2004 20:16:07 -0000 1.10 --- PgTypeCollection.cs 20 Jul 2004 18:41:43 -0000 1.11 *************** *** 99,103 **** } ! public PgType Add(int oid, string name, PgDataType dataType, int elementType, short formatCode, int size) { PgType type = new PgType(oid, name, dataType, elementType, formatCode, size); --- 99,103 ---- } ! public PgType Add(int oid, string name, PgDataType dataType, int elementType, PgTypeFormat formatCode, int size) { PgType type = new PgType(oid, name, dataType, elementType, formatCode, size); Index: PgType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgType.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PgType.cs 10 Apr 2004 20:16:07 -0000 1.12 --- PgType.cs 20 Jul 2004 18:41:43 -0000 1.13 *************** *** 22,36 **** namespace PostgreSql.Data.NPgClient { internal class PgType { #region Fields ! private int oid; ! private string name; ! private PgDataType dataType; ! private Type systemType; ! private int elementType; ! private short formatCode; ! private int size; #endregion --- 22,42 ---- namespace PostgreSql.Data.NPgClient { + internal enum PgTypeFormat : short + { + Text = 0, + Binary = 1 + } + internal class PgType { #region Fields ! private int oid; ! private string name; ! private PgDataType dataType; ! private Type systemType; ! private int elementType; ! private PgTypeFormat formatCode; ! private int size; #endregion *************** *** 73,77 **** } ! public short FormatCode { get { return this.formatCode; } --- 79,83 ---- } ! public PgTypeFormat FormatCode { get { return this.formatCode; } *************** *** 87,91 **** #region Constructors ! public PgType(int oid, string name, PgDataType dataType, int elementType, short formatCode, int size) { this.oid = oid; --- 93,97 ---- #region Constructors ! public PgType(int oid, string name, PgDataType dataType, int elementType, PgTypeFormat formatCode, int size) { this.oid = oid; Index: PgFieldDescriptor.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgFieldDescriptor.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PgFieldDescriptor.cs 10 Apr 2004 20:16:07 -0000 1.4 --- PgFieldDescriptor.cs 20 Jul 2004 18:41:43 -0000 1.5 *************** *** 25,35 **** #region Fields ! private string fieldName; ! private int oidTable; ! private short oidNumber; ! private PgType dataType; ! private short dataTypeSize; ! private int typeModifier; ! private short formatCode; #endregion --- 25,35 ---- #region Fields ! private string fieldName; ! private int oidTable; ! private short oidNumber; ! private PgType dataType; ! private short dataTypeSize; ! private int typeModifier; ! private PgTypeFormat formatCode; #endregion *************** *** 73,77 **** } ! public short FormatCode { get { return this.formatCode; } --- 73,77 ---- } ! public PgTypeFormat FormatCode { get { return this.formatCode; } Index: PgDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** PgDbClient.cs 31 May 2004 17:19:55 -0000 1.49 --- PgDbClient.cs 20 Jul 2004 18:41:43 -0000 1.50 *************** *** 23,29 **** using System.Text; using System.Net; using System.Net.Sockets; ! using Tls=Mono.Security.Protocol.Tls; using Mono.Security.Protocol.Tls; --- 23,30 ---- using System.Text; using System.Net; + using System.Net.Security; using System.Net.Sockets; ! using Mono.Security.Cryptography; using Mono.Security.Protocol.Tls; *************** *** 167,170 **** --- 168,287 ---- #endregion + #region Static Methods + + public static void InitializeTypes() + { + if (types != null) + { + return; + } + + types = new PgTypeCollection(); + + types.Add(16 , "bool" , PgDataType.Boolean , 0, PgTypeFormat.Binary, 1); + types.Add(17 , "bytea" , PgDataType.Binary , 0, PgTypeFormat.Binary, 0); + types.Add(18 , "char" , PgDataType.Char , 0, PgTypeFormat.Text, 0); + types.Add(19 , "name" , PgDataType.VarChar , 0, PgTypeFormat.Text, 0); + types.Add(20 , "int8" , PgDataType.Int8 , 0, PgTypeFormat.Binary, 8); + types.Add(21 , "int2" , PgDataType.Int2 , 0, PgTypeFormat.Binary, 2); + types.Add(22 , "int2vector" , PgDataType.Vector , 21, PgTypeFormat.Binary, 2); + types.Add(23 , "int4" , PgDataType.Int4 , 0, PgTypeFormat.Binary, 4); + types.Add(24 , "regproc" , PgDataType.VarChar , 0, PgTypeFormat.Text, 0); + types.Add(25 , "text" , PgDataType.VarChar , 0, PgTypeFormat.Text, 0); + types.Add(26 , "oid" , PgDataType.Int4 , 0, PgTypeFormat.Binary, 4); + types.Add(30 , "oidvector" , PgDataType.Vector , 26, PgTypeFormat.Binary, 4); + types.Add(600 , "point" , PgDataType.Point , 701, PgTypeFormat.Binary, 16); + types.Add(601 , "lseg" , PgDataType.LSeg , 600, PgTypeFormat.Binary, 32); + types.Add(602 , "path" , PgDataType.Path , 0, PgTypeFormat.Binary, 16); + types.Add(603 , "box" , PgDataType.Box , 600, PgTypeFormat.Binary, 32); + types.Add(604 , "polygon" , PgDataType.Polygon , 0, PgTypeFormat.Binary, 16); + types.Add(628 , "line" , PgDataType.Line , 701, PgTypeFormat.Binary, 32); + types.Add(629 , "_line" , PgDataType.Array , 628, PgTypeFormat.Binary, 32); + types.Add(718 , "circle" , PgDataType.Circle , 0, PgTypeFormat.Binary, 24); + types.Add(719 , "_circle" , PgDataType.Array , 718, PgTypeFormat.Binary, 24); + types.Add(700 , "float4" , PgDataType.Float , 0, PgTypeFormat.Binary, 4); + types.Add(701 , "float8" , PgDataType.Double , 0, PgTypeFormat.Binary, 8); + types.Add(705 , "unknown" , PgDataType.Binary , 0, PgTypeFormat.Binary, 0); + types.Add(790 , "money" , PgDataType.Currency , 0, PgTypeFormat.Binary, 4); + types.Add(829 , "macaddr" , PgDataType.VarChar , 0, PgTypeFormat.Text, 6); + types.Add(869 , "inet" , PgDataType.VarChar , 0, PgTypeFormat.Text, 0); + types.Add(1000 , "_bool" , PgDataType.Array , 16, PgTypeFormat.Binary, 1); + types.Add(1005 , "_int2" , PgDataType.Array , 21, PgTypeFormat.Binary, 2); + types.Add(1007 , "_int4" , PgDataType.Array , 23, PgTypeFormat.Binary, 4); + types.Add(1009 , "_text" , PgDataType.Array , 25, PgTypeFormat.Binary, 0); + types.Add(1016 , "_int8" , PgDataType.Array , 20, PgTypeFormat.Binary, 8); + types.Add(1017 , "_point" , PgDataType.Array , 600, PgTypeFormat.Binary, 16); + types.Add(1018 , "_lseg" , PgDataType.Array , 601, PgTypeFormat.Binary, 32); + types.Add(1019 , "_path" , PgDataType.Array , 602, PgTypeFormat.Binary, -1); + types.Add(1020 , "_box" , PgDataType.Array , 603, PgTypeFormat.Binary, 32); + types.Add(1021 , "_float4" , PgDataType.Array , 700, PgTypeFormat.Binary, 4); + types.Add(1027 , "_polygon" , PgDataType.Array , 604, PgTypeFormat.Binary, 16); + types.Add(1033 , "aclitem" , PgDataType.VarChar , 0, PgTypeFormat.Text, 12); + types.Add(1034 , "_aclitem" , PgDataType.Array , 1033, PgTypeFormat.Text, 0); + types.Add(1042 , "bpchar" , PgDataType.VarChar , 0, PgTypeFormat.Text, 0); + types.Add(1043 , "varchar" , PgDataType.VarChar , 0, PgTypeFormat.Text, 0); + types.Add(1082 , "date" , PgDataType.Date , 0, PgTypeFormat.Binary, 4); + types.Add(1083 , "time" , PgDataType.Time , 0, PgTypeFormat.Text, 8); + types.Add(1114 , "timestamp" , PgDataType.Timestamp , 0, PgTypeFormat.Text, 8); + types.Add(1184 , "timestamptz" , PgDataType.TimestampWithTZ, 0, PgTypeFormat.Binary, 8); + types.Add(1186 , "interval" , PgDataType.Interval , 0, PgTypeFormat.Binary, 12); + types.Add(1266 , "timetz" , PgDataType.TimeWithTZ , 0, PgTypeFormat.Binary, 12); + types.Add(1560 , "bit" , PgDataType.Byte , 0, PgTypeFormat.Text, 1); + types.Add(1562 , "varbit" , PgDataType.Byte , 0, PgTypeFormat.Binary, 0); + types.Add(1700 , "numeric" , PgDataType.Decimal , 0, PgTypeFormat.Text, 8); + types.Add(1790 , "refcursor" , PgDataType.VarChar , 0, PgTypeFormat.Text, 0); + types.Add(2277 , "anyarray" , PgDataType.Array , 0, PgTypeFormat.Binary, 8); + } + + public static void InitializeCharSets() + { + if (charSets != null) + { + return; + } + + 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) + { + } + } + + #endregion + #region Database Methods *************** *** 189,201 **** this.sslStream = new SslClientStream( this.networkStream, ! this.settings.ServerName, ! true, ! Tls.SecurityProtocolType.Tls| ! Tls.SecurityProtocolType.Ssl3); ! this.receive = new BinaryReader(this.sslStream); this.send = new BinaryWriter(this.sslStream); ! if (this.SslConnection != null) { this.SslConnection(); --- 306,318 ---- this.sslStream = new SslClientStream( this.networkStream, ! this.settings.ServerName, ! false, ! Mono.Security.Protocol.Tls.SecurityProtocolType.Tls| ! Mono.Security.Protocol.Tls.SecurityProtocolType.Ssl3); ! this.receive = new BinaryReader(this.sslStream); this.send = new BinaryWriter(this.sslStream); ! if (this.SslConnection != null) { this.SslConnection(); *************** *** 208,219 **** packet.WriteInt(PgCodes.PROTOCOL_VERSION3); ! packet.WriteString("user"); ! packet.WriteString(this.settings.UserName); if (settings.Database != null && this.settings.Database.Length > 0) { ! packet.WriteString("database"); ! packet.WriteString(this.settings.Database); } packet.Write((byte)0); // Terminator --- 325,338 ---- packet.WriteInt(PgCodes.PROTOCOL_VERSION3); ! packet.WriteNullString("user"); ! packet.WriteNullString(this.settings.UserName); if (settings.Database != null && this.settings.Database.Length > 0) { ! packet.WriteNullString("database"); ! packet.WriteNullString(this.settings.Database); } + packet.WriteNullString("DateStyle"); + packet.WriteNullString(PgCodes.DATE_STYLE); packet.Write((byte)0); // Terminator *************** *** 416,424 **** case PgCodes.AUTH_KERBEROS_V5: // Kerberos V5 authentication is required ! break; case PgCodes.AUTH_CLEARTEXT_PASSWORD: // Cleartext password is required ! outPacket.WriteString(settings.UserPassword); break; --- 535,543 ---- case PgCodes.AUTH_KERBEROS_V5: // Kerberos V5 authentication is required ! break; case PgCodes.AUTH_CLEARTEXT_PASSWORD: // Cleartext password is required ! outPacket.WriteNullString(settings.UserPassword); break; *************** *** 442,446 **** // Finally write the md5 hash to the packet ! outPacket.WriteString(PgCodes.MD5_PREFIX + hash); break; --- 561,565 ---- // Finally write the md5 hash to the packet ! outPacket.WriteNullString(PgCodes.MD5_PREFIX + hash); break; *************** *** 703,822 **** #endregion - #region Static Methods - - public static void InitializeTypes() - { - if (types != null) - { - return; - } - - types = new PgTypeCollection(); - - types.Add(16 , "bool" , PgDataType.Boolean , 0, 1, 1); - types.Add(17 , "bytea" , PgDataType.Binary , 0, 1, 0); - types.Add(18 , "char" , PgDataType.Char , 0, 0, 0); - types.Add(19 , "name" , PgDataType.VarChar , 0, 0, 0); - types.Add(20 , "int8" , PgDataType.Int8 , 0, 1, 8); - types.Add(21 , "int2" , PgDataType.Int2 , 0, 1, 2); - types.Add(22 , "int2vector" , PgDataType.Vector , 21, 1, 2); - types.Add(23 , "int4" , PgDataType.Int4 , 0, 1, 4); - types.Add(24 , "regproc" , PgDataType.VarChar , 0, 0, 0); - types.Add(25 , "text" , PgDataType.VarChar , 0, 0, 0); - types.Add(26 , "oid" , PgDataType.Int4 , 0, 1, 4); - types.Add(30 , "oidvector" , PgDataType.Vector , 26, 1, 4); - types.Add(600 , "point" , PgDataType.Point , 701, 1, 16); - types.Add(601 , "lseg" , PgDataType.LSeg , 600, 1, 32); - types.Add(602 , "path" , PgDataType.Path , 0, 1, 16); - types.Add(603 , "box" , PgDataType.Box , 600, 1, 32); - types.Add(604 , "polygon" , PgDataType.Polygon , 0, 1, 16); - types.Add(628 , "line" , PgDataType.Line , 701, 1, 32); - types.Add(629 , "_line" , PgDataType.Array , 628, 1, 32); - types.Add(718 , "circle" , PgDataType.Circle , 0, 1, 24); - types.Add(719 , "_circle" , PgDataType.Array , 718, 1, 24); - types.Add(700 , "float4" , PgDataType.Float , 0, 1, 4); - types.Add(701 , "float8" , PgDataType.Double , 0, 1, 8); - types.Add(705 , "unknown" , PgDataType.Binary , 0, 1, 0); - types.Add(790 , "money" , PgDataType.Currency , 0, 1, 4); - types.Add(829 , "macaddr" , PgDataType.VarChar , 0, 0, 6); - types.Add(869 , "inet" , PgDataType.VarChar , 0, 0, 0); - types.Add(1000 , "_bool" , PgDataType.Array , 16, 1, 1); - types.Add(1005 , "_int2" , PgDataType.Array , 21, 1, 2); - types.Add(1007 , "_int4" , PgDataType.Array , 23, 1, 4); - types.Add(1009 , "_text" , PgDataType.Array , 25, 1, 0); - types.Add(1016 , "_int8" , PgDataType.Array , 20, 1, 8); - types.Add(1017 , "_point" , PgDataType.Array , 600, 1, 16); - types.Add(1018 , "_lseg" , PgDataType.Array , 601, 1, 32); - types.Add(1019 , "_path" , PgDataType.Array , 602, 1, -1); - types.Add(1020 , "_box" , PgDataType.Array , 603, 1, 32); - types.Add(1021 , "_float4" , PgDataType.Array , 700, 1, 4); - types.Add(1027 , "_polygon" , PgDataType.Array , 604, 1, 16); - types.Add(1033 , "aclitem" , PgDataType.VarChar , 0, 0, 12); - types.Add(1034 , "_aclitem" , PgDataType.Array , 1033, 0, 0); - types.Add(1042 , "bpchar" , PgDataType.VarChar , 0, 0, 0); - types.Add(1043 , "varchar" , PgDataType.VarChar , 0, 0, 0); - types.Add(1082 , "date" , PgDataType.Date , 0, 1, 4); - types.Add(1083 , "time" , PgDataType.Time , 0, 1, 8); - types.Add(1114 , "timestamp" , PgDataType.Timestamp , 0, 1, 8); - types.Add(1184 , "timestamptz" , PgDataType.TimestampWithTZ, 0, 1, 8); - types.Add(1186 , "interval" , PgDataType.Interval , 0, 1, 12); - types.Add(1266 , "timetz" , PgDataType.TimeWithTZ , 0, 1, 12); - types.Add(1560 , "bit" , PgDataType.Byte , 0, 0, 1); - types.Add(1562 , "varbit" , PgDataType.Byte , 0, 1, 0); - types.Add(1700 , "numeric" , PgDataType.Decimal , 0, 0, 8); - types.Add(1790 , "refcursor" , PgDataType.VarChar , 0, 0, 0); - types.Add(2277 , "anyarray" , PgDataType.Array , 0, 1, 8); - } - - public static void InitializeCharSets() - { - if (charSets != null) - { - return; - } - - 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) - { - } - } - - #endregion - #region Methods --- 822,825 ---- Index: PgStatement.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgStatement.cs,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** PgStatement.cs 10 Apr 2004 20:16:07 -0000 1.24 --- PgStatement.cs 20 Jul 2004 18:41:43 -0000 1.25 *************** *** 198,203 **** PgOutputPacket packet = new PgOutputPacket(this.db.Settings.Encoding); ! packet.WriteString(this.ParseName); ! packet.WriteString(this.stmtText); packet.WriteShort(0); --- 198,203 ---- PgOutputPacket packet = new PgOutputPacket(this.db.Settings.Encoding); ! packet.WriteNullString(this.ParseName); ! packet.WriteNullString(this.stmtText); packet.WriteShort(0); *************** *** 239,243 **** packet.Write((byte)stmtType); ! packet.WriteString(name); // Send packet to the server --- 239,243 ---- packet.Write((byte)stmtType); ! packet.WriteNullString(name); // Send packet to the server *************** *** 278,284 **** // Destination portal name ! packet.WriteString(this.PortalName); // Prepared statement name ! packet.WriteString(this.ParseName); // Send parameters format code. --- 278,284 ---- // Destination portal name ! packet.WriteNullString(this.PortalName); // Prepared statement name ! packet.WriteNullString(this.ParseName); // Send parameters format code. *************** *** 286,290 **** for (int i = 0; i < parameters.Length; i++) { ! packet.WriteShort(this.parameters[i].DataType.FormatCode); } --- 286,290 ---- for (int i = 0; i < parameters.Length; i++) { ! packet.WriteShort((short)this.parameters[i].DataType.FormatCode); } *************** *** 300,304 **** for (int i = 0; i < this.rowDescriptor.Fields.Length; i++) { ! packet.WriteShort(this.rowDescriptor.Fields[i].DataType.FormatCode); } --- 300,304 ---- for (int i = 0; i < this.rowDescriptor.Fields.Length; i++) { ! packet.WriteShort((short)this.rowDescriptor.Fields[i].DataType.FormatCode); } *************** *** 327,331 **** PgOutputPacket packet = new PgOutputPacket(this.db.Settings.Encoding); ! packet.WriteString(this.PortalName); packet.WriteInt(this.fetchSize); // Rows to retrieve ( 0 = nolimit ) --- 327,331 ---- PgOutputPacket packet = new PgOutputPacket(this.db.Settings.Encoding); ! packet.WriteNullString(this.PortalName); packet.WriteInt(this.fetchSize); // Rows to retrieve ( 0 = nolimit ) *************** *** 393,397 **** for (int i = 0; i < this.parameters.Length; i++) { ! packet.WriteShort(this.parameters[i].DataType.FormatCode); } --- 393,397 ---- for (int i = 0; i < this.parameters.Length; i++) { ! packet.WriteShort((short)this.parameters[i].DataType.FormatCode); } *************** *** 440,444 **** PgOutputPacket packet = new PgOutputPacket(this.db.Settings.Encoding); ! packet.WriteString(this.stmtText); // Send packet to the server --- 440,444 ---- PgOutputPacket packet = new PgOutputPacket(this.db.Settings.Encoding); ! packet.WriteNullString(this.stmtText); // Send packet to the server *************** *** 549,553 **** packet.Write((byte)stmtType); ! packet.WriteString(name); // Send packet to the server --- 549,553 ---- packet.Write((byte)stmtType); ! packet.WriteNullString(name); // Send packet to the server *************** *** 718,722 **** this.rowDescriptor.Fields[i].DataTypeSize = packet.ReadShort(); this.rowDescriptor.Fields[i].TypeModifier = packet.ReadInt(); ! this.rowDescriptor.Fields[i].FormatCode = packet.ReadShort(); } } --- 718,722 ---- this.rowDescriptor.Fields[i].DataTypeSize = packet.ReadShort(); this.rowDescriptor.Fields[i].TypeModifier = packet.ReadInt(); ! this.rowDescriptor.Fields[i].FormatCode = (PgTypeFormat)packet.ReadShort(); } } *************** *** 742,746 **** this.rowIndex = 0; } ! for (int i = 0; i < values.Length; i++) { --- 742,746 ---- this.rowIndex = 0; } ! for (int i = 0; i < values.Length; i++) { Index: PgOutputPacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgOutputPacket.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PgOutputPacket.cs 3 Jun 2004 16:37:20 -0000 1.26 --- PgOutputPacket.cs 20 Jul 2004 18:41:43 -0000 1.27 *************** *** 68,72 **** #region String Types ! public void WriteString(string data) { if (!data.EndsWith(PgCodes.NULL_TERMINATOR.ToString())) --- 68,72 ---- #region String Types ! public void WriteNullString(string data) { if (!data.EndsWith(PgCodes.NULL_TERMINATOR.ToString())) *************** *** 78,81 **** --- 78,87 ---- } + public void WriteString(string data) + { + this.WriteInt(data.Length); + this.Write(this.encoding.GetBytes(data)); + } + #endregion *************** *** 133,176 **** public void WriteTime(DateTime time) { ! DateTime realTime = new DateTime(PgCodes.BASE_DATE.Year, ! PgCodes.BASE_DATE.Month, ! PgCodes.BASE_DATE.Day, ! time.Hour, ! time.Minute, ! time.Second, ! time.Millisecond); ! ! TimeSpan seconds = realTime.Subtract(PgCodes.BASE_DATE); ! ! this.WriteDouble(seconds.TotalSeconds); ! } public void WriteTimeWithTZ(DateTime time) { ! DateTime realTime = new DateTime(PgCodes.BASE_DATE.Year, ! PgCodes.BASE_DATE.Month, ! PgCodes.BASE_DATE.Day, ! time.Hour, ! time.Minute, ! time.Second, ! time.Millisecond); ! ! TimeSpan seconds = realTime.Subtract(PgCodes.BASE_DATE); ! ! this.WriteDouble(seconds.TotalSeconds); ! this.WriteInt((-1)*Int32.Parse(time.ToString("zz"))*3600); ! } public void WriteTimestamp(DateTime timestamp) { ! TimeSpan days = timestamp.Subtract(PgCodes.BASE_DATE); ! ! this.WriteDouble(days.TotalSeconds); ! } public void WriteTimestampWithTZ(DateTime timestamp) { ! this.WriteTimestamp(timestamp); ! } #endregion --- 139,159 ---- public void WriteTime(DateTime time) { ! this.WriteString(time.ToString("HH:mm:ss.fff")); ! } public void WriteTimeWithTZ(DateTime time) { ! this.WriteString(time.ToString("HH:mm:ss.fff zz")); ! } public void WriteTimestamp(DateTime timestamp) { ! this.WriteString(timestamp.ToString("yyyy/MM/dd HH:mm:ss.fff")); ! } public void WriteTimestampWithTZ(DateTime timestamp) { ! this.WriteString(timestamp.ToString("yyyy/MM/dd HH:mm:ss.fff zz")); ! } #endregion *************** *** 359,378 **** case PgDataType.Time: ! packet.WriteInt(size); packet.WriteTime(Convert.ToDateTime(value)); break; case PgDataType.TimeWithTZ: ! packet.WriteInt(size); packet.WriteTimeWithTZ(Convert.ToDateTime(value)); break; case PgDataType.Timestamp: ! packet.WriteInt(size); packet.WriteTimestamp(Convert.ToDateTime(value)); break; case PgDataType.TimestampWithTZ: ! packet.WriteInt(size); packet.WriteTimestampWithTZ(Convert.ToDateTime(value)); break; --- 342,361 ---- case PgDataType.Time: ! // packet.WriteInt(size); packet.WriteTime(Convert.ToDateTime(value)); break; case PgDataType.TimeWithTZ: ! // packet.WriteInt(size); packet.WriteTimeWithTZ(Convert.ToDateTime(value)); break; case PgDataType.Timestamp: ! // packet.WriteInt(size); packet.WriteTimestamp(Convert.ToDateTime(value)); break; case PgDataType.TimestampWithTZ: ! // packet.WriteInt(size); packet.WriteTimestampWithTZ(Convert.ToDateTime(value)); break; *************** *** 382,386 **** { string paramValue = value.ToString() + PgCodes.NULL_TERMINATOR; - packet.WriteInt(encoding.GetByteCount(paramValue)); packet.WriteString(paramValue); } --- 365,368 ---- Index: PgCodes.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgCodes.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PgCodes.cs 9 Feb 2004 14:20:45 -0000 1.3 --- PgCodes.cs 20 Jul 2004 18:41:43 -0000 1.4 *************** *** 128,131 **** --- 128,134 ---- public const int BINARY_FORMAT = 1; + // Date & Time codes + public const string DATE_STYLE = "ISO"; + // Numeric data type public const int NUMERIC_SIGN_MASK = 0xC000; |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18724 Modified Files: AuthorityKeyIdentifierExtension.cs BasicConstraintsExtension.cs CertificatePoliciesExtension.cs CRLDistributionPointsExtension.cs ExtendedKeyUsageExtension.cs KeyAttributesExtension.cs KeyUsageExtension.cs NetscapeCertTypeExtension.cs PrivateKeyUsagePeriodExtension.cs SubjectAltNameExtension.cs SubjectKeyIdentifierExtension.cs Log Message: Prepare for beta 7 Index: KeyAttributesExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/KeyAttributesExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeyAttributesExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- KeyAttributesExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Globalization; Index: NetscapeCertTypeExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/NetscapeCertTypeExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NetscapeCertTypeExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- NetscapeCertTypeExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Globalization; Index: ExtendedKeyUsageExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/ExtendedKeyUsageExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExtendedKeyUsageExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- ExtendedKeyUsageExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Collections; Index: SubjectAltNameExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/SubjectAltNameExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SubjectAltNameExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- SubjectAltNameExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Net; Index: CertificatePoliciesExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/CertificatePoliciesExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CertificatePoliciesExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- CertificatePoliciesExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Collections; Index: AuthorityKeyIdentifierExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AuthorityKeyIdentifierExtension.cs 9 May 2004 12:06:36 -0000 1.2 --- AuthorityKeyIdentifierExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Globalization; Index: CRLDistributionPointsExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/CRLDistributionPointsExtension.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CRLDistributionPointsExtension.cs 9 May 2004 12:06:37 -0000 1.3 --- CRLDistributionPointsExtension.cs 20 Jul 2004 17:46:47 -0000 1.4 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Collections; Index: PrivateKeyUsagePeriodExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/PrivateKeyUsagePeriodExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PrivateKeyUsagePeriodExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- PrivateKeyUsagePeriodExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Globalization; Index: SubjectKeyIdentifierExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/SubjectKeyIdentifierExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SubjectKeyIdentifierExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- SubjectKeyIdentifierExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Globalization; Index: BasicConstraintsExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/BasicConstraintsExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BasicConstraintsExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- BasicConstraintsExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Globalization; Index: KeyUsageExtension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeyUsageExtension.cs 9 May 2004 12:06:37 -0000 1.2 --- KeyUsageExtension.cs 20 Jul 2004 17:46:47 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Globalization; *************** *** 66,69 **** --- 87,95 ---- public KeyUsageExtension (X509Extension extension) : base (extension) {} + public KeyUsageExtension () : base () + { + extnOid = "2.5.29.15"; + } + protected override void Decode () { *************** *** 76,79 **** --- 102,117 ---- } + protected override void Encode () + { + if (extnValue == null) { + extnValue = new ASN1 (0x03, new byte[] { 0x00, (byte)kubits }); + } + } + + public KeyUsages KeyUsage { + get { return (KeyUsages) kubits; } + set { kubits = Convert.ToInt32 (value, CultureInfo.InvariantCulture); } + } + public override string Name { get { return "Key Usage"; } |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18497 Modified Files: ITrustAnchors.cs PKCS12.cs TrustAnchors.cs X501Name.cs X509Builder.cs X509Certificate.cs X509CertificateBuilder.cs X509CertificateCollection.cs X509Chain.cs X509ChainStatusFlags.cs X509CRL.cs X509Extension.cs X509Extensions.cs X509Store.cs X509StoreManager.cs X509Stores.cs X520Attributes.cs Log Message: Prepare for beta 7 Index: X509Extension.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509Extension.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509Extension.cs 9 May 2004 12:06:15 -0000 1.2 --- X509Extension.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Globalization; Index: ITrustAnchors.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/ITrustAnchors.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ITrustAnchors.cs 9 May 2004 12:06:15 -0000 1.2 --- ITrustAnchors.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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; Index: X509Stores.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509Stores.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509Stores.cs 9 May 2004 12:06:15 -0000 1.2 --- X509Stores.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Collections; Index: X509Certificate.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509Certificate.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** X509Certificate.cs 12 Jun 2004 09:26:20 -0000 1.4 --- X509Certificate.cs 20 Jul 2004 17:45:50 -0000 1.5 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Security.Cryptography; Index: X509Chain.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509Chain.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** X509Chain.cs 12 Jun 2004 09:26:20 -0000 1.4 --- X509Chain.cs 20 Jul 2004 17:45:50 -0000 1.5 *************** *** 13,16 **** --- 13,37 ---- // + // + // 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.Security; *************** *** 183,187 **** return false; } ! /* // TODO - we should check for CRITICAL but unknown extensions // X509ChainStatusFlags.InvalidExtension --- 204,208 ---- return false; } ! // TODO - we should check for CRITICAL but unknown extensions // X509ChainStatusFlags.InvalidExtension *************** *** 193,197 **** } #endif - */ return true; } --- 214,217 ---- Index: X509Extensions.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509Extensions.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509Extensions.cs 9 May 2004 12:06:15 -0000 1.2 --- X509Extensions.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Collections; Index: X509ChainStatusFlags.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509ChainStatusFlags.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509ChainStatusFlags.cs 9 May 2004 12:06:15 -0000 1.2 --- X509ChainStatusFlags.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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; Index: X520Attributes.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X520Attributes.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** X520Attributes.cs 9 May 2004 12:06:15 -0000 1.3 --- X520Attributes.cs 20 Jul 2004 17:45:50 -0000 1.4 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Text; *************** *** 81,84 **** --- 102,109 ---- asn1.Add (new ASN1 (0x13, Encoding.ASCII.GetBytes (attrValue))); break; + case 0x16: + // IA5STRING + asn1.Add (new ASN1 (0x16, Encoding.ASCII.GetBytes (attrValue))); + break; case 0x1E: // BMPSTRING *************** *** 156,159 **** --- 181,192 ---- } + // NOTE: Not part of RFC2253 + public class EmailAddress : AttributeTypeAndValue + { + public EmailAddress () : base ("1.2.840.113549.1.9.1", 128, 0x16) + { + } + } + /* -- Naming attributes of type X520Title * id-at-title AttributeType ::= { id-at 12 } Index: X501Name.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X501Name.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X501Name.cs 9 May 2004 12:06:15 -0000 1.2 --- X501Name.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Globalization; *************** *** 142,145 **** --- 163,168 ---- case "ST": // RFC2253 return new X520.StateOrProvinceName (); + case "E": // NOTE: Not part of RFC2253 + return new X520.EmailAddress (); case "DC": // return streetAddress; Index: X509CertificateCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509CertificateCollection.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** X509CertificateCollection.cs 9 May 2004 12:06:15 -0000 1.3 --- X509CertificateCollection.cs 20 Jul 2004 17:45:50 -0000 1.4 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Collections; Index: X509CertificateBuilder.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509CertificateBuilder.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509CertificateBuilder.cs 9 May 2004 12:06:15 -0000 1.2 --- X509CertificateBuilder.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Security.Cryptography; Index: PKCS12.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/PKCS12.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PKCS12.cs 12 Jun 2004 09:26:20 -0000 1.3 --- PKCS12.cs 20 Jul 2004 17:45:50 -0000 1.4 *************** *** 12,15 **** --- 12,36 ---- // + // + // 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.Collections; Index: X509Store.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509Store.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509Store.cs 9 May 2004 12:06:15 -0000 1.2 --- X509Store.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Collections; Index: X509Builder.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509Builder.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509Builder.cs 9 May 2004 12:06:15 -0000 1.2 --- X509Builder.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Globalization; Index: TrustAnchors.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/TrustAnchors.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TrustAnchors.cs 9 May 2004 12:06:15 -0000 1.3 --- TrustAnchors.cs 20 Jul 2004 17:45:50 -0000 1.4 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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; Index: X509CRL.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509CRL.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509CRL.cs 9 May 2004 12:06:15 -0000 1.2 --- X509CRL.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Collections; Index: X509StoreManager.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.X509/X509StoreManager.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** X509StoreManager.cs 9 May 2004 12:06:15 -0000 1.2 --- X509StoreManager.cs 20 Jul 2004 17:45:50 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Collections; |
From: Carlos G. Á. <car...@us...> - 2004-07-20 17:45:27
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18391 Modified Files: ARC4Managed.cs CryptoTools.cs PKCS1.cs PKCS8.cs RC4.cs RSAManaged.cs Log Message: Prepare for beta 7 Index: PKCS1.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography/PKCS1.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PKCS1.cs 9 May 2004 12:04:34 -0000 1.2 --- PKCS1.cs 20 Jul 2004 17:45:14 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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.Security.Cryptography; Index: CryptoTools.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography/CryptoTools.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CryptoTools.cs 9 May 2004 12:04:34 -0000 1.2 --- CryptoTools.cs 20 Jul 2004 17:45:14 -0000 1.3 *************** *** 10,13 **** --- 10,34 ---- // + // + // 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.Security.Cryptography; Index: ARC4Managed.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography/ARC4Managed.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ARC4Managed.cs 12 Jun 2004 09:29:01 -0000 1.3 --- ARC4Managed.cs 20 Jul 2004 17:45:14 -0000 1.4 *************** *** 4,7 **** --- 4,28 ---- // + // + // 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.Globalization; Index: PKCS8.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography/PKCS8.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PKCS8.cs 12 Jun 2004 09:29:00 -0000 1.3 --- PKCS8.cs 20 Jul 2004 17:45:14 -0000 1.4 *************** *** 10,13 **** --- 10,34 ---- // + // + // 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.Collections; Index: RSAManaged.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RSAManaged.cs 9 May 2004 12:04:34 -0000 1.3 --- RSAManaged.cs 20 Jul 2004 17:45:14 -0000 1.4 *************** *** 14,17 **** --- 14,38 ---- // + // + // 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.Security.Cryptography; Index: RC4.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography/RC4.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RC4.cs 5 Mar 2004 23:15:21 -0000 1.2 --- RC4.cs 20 Jul 2004 17:45:14 -0000 1.3 *************** *** 9,12 **** --- 9,33 ---- // + // + // 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.Security.Cryptography; *************** *** 27,35 **** { KeySizeValue = 128; ! BlockSizeValue = 64; FeedbackSizeValue = BlockSizeValue; LegalBlockSizesValue = s_legalBlockSizes; LegalKeySizesValue = s_legalKeySizes; ! } new static public RC4 Create() --- 48,56 ---- { KeySizeValue = 128; ! BlockSizeValue = 0; FeedbackSizeValue = BlockSizeValue; LegalBlockSizesValue = s_legalBlockSizes; LegalKeySizesValue = s_legalKeySizes; ! } new static public RC4 Create() |
From: Carlos G. Á. <car...@us...> - 2004-07-20 17:45:03
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18295 Modified Files: ASN1.cs ASN1Convert.cs BitConverterLE.cs PKCS7.cs Log Message: Prepare for beta 7 Index: PKCS7.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security/PKCS7.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PKCS7.cs 9 May 2004 12:04:00 -0000 1.2 --- PKCS7.cs 20 Jul 2004 17:44:53 -0000 1.3 *************** *** 10,13 **** --- 10,34 ---- // + // + // 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.Collections; *************** *** 528,532 **** private ArrayList crls; private SignerInfo signerInfo; ! private ASN1 mda; public SignedData () --- 549,553 ---- private ArrayList crls; private SignerInfo signerInfo; ! private bool mda; public SignedData () *************** *** 537,540 **** --- 558,562 ---- crls = new ArrayList (); signerInfo = new SignerInfo (); + mda = true; } *************** *** 553,558 **** version = asn1[0][0].Value[0]; - // digestInfo - contentInfo = new ContentInfo (asn1[0][2]); --- 575,578 ---- *************** *** 576,579 **** --- 596,607 ---- else signerInfo = new SignerInfo (); + + // Exchange hash algorithm Oid from SignerInfo + if (signerInfo.HashName != null) { + HashName = OidToName(signerInfo.HashName); + } + + // Check if SignerInfo has authenticated attributes + mda = (signerInfo.AuthenticatedAttributes.Count > 0); } *************** *** 612,615 **** --- 640,699 ---- } + public bool UseAuthenticatedAttributes { + get { return mda; } + set { mda = value; } + } + + public bool VerifySignature (AsymmetricAlgorithm aa) + { + if (aa == null) { + return false; + } + + RSAPKCS1SignatureDeformatter r = new RSAPKCS1SignatureDeformatter (aa); + r.SetHashAlgorithm (hashAlgorithm); + HashAlgorithm ha = HashAlgorithm.Create (hashAlgorithm); + + byte[] signature = signerInfo.Signature; + byte[] hash = null; + + if (mda) { + ASN1 asn = new ASN1 (0x31); + foreach (ASN1 attr in signerInfo.AuthenticatedAttributes) + asn.Add (attr); + + hash = ha.ComputeHash (asn.GetBytes ()); + } else { + hash = ha.ComputeHash (contentInfo.Content[0].Value); + } + + if (hash != null && signature != null) { + return r.VerifySignature (hash, signature); + } + return false; + } + + internal string OidToName (string oid) + { + switch (oid) { + case "1.3.14.3.2.26" : + return "SHA1"; + case "1.2.840.113549.2.2" : + return "MD2"; + case "1.2.840.113549.2.5" : + return "MD5"; + case "2.16.840.1.101.3.4.1" : + return "SHA256"; + case "2.16.840.1.101.3.4.2" : + return "SHA384"; + case "2.16.840.1.101.3.4.3" : + return "SHA512"; + default : + break; + } + // Unknown Oid + return oid; + } + internal ASN1 GetASN1 () { *************** *** 629,639 **** ASN1 ci = contentInfo.ASN1; signedData.Add (ci); ! if ((mda == null) && (hashAlgorithm != null)) { ! // automatically add the messageDigest authenticated attribute ! HashAlgorithm ha = HashAlgorithm.Create (hashAlgorithm); ! byte[] idcHash = ha.ComputeHash (ci[1][0].Value); ! ASN1 md = new ASN1 (0x30); ! mda = Attribute (Oid.messageDigest, md.Add (new ASN1 (0x04, idcHash))); ! signerInfo.AuthenticatedAttributes.Add (mda); } --- 713,738 ---- ASN1 ci = contentInfo.ASN1; signedData.Add (ci); ! if (hashAlgorithm != null) { ! if (mda) { ! // Use authenticated attributes for signature ! ! // Automatically add the contentType authenticated attribute ! ASN1 ctattr = Attribute (Oid.contentType, ci[0]); ! signerInfo.AuthenticatedAttributes.Add (ctattr); ! ! // Automatically add the messageDigest authenticated attribute ! HashAlgorithm ha = HashAlgorithm.Create (hashAlgorithm); ! byte[] idcHash = ha.ComputeHash (ci[1][0].Value); ! ASN1 md = new ASN1 (0x30); ! ASN1 mdattr = Attribute (Oid.messageDigest, md.Add (new ASN1 (0x04, idcHash))); ! signerInfo.AuthenticatedAttributes.Add (mdattr); ! } else { ! // Don't use authenticated attributes for signature -- signature is content ! RSAPKCS1SignatureFormatter r = new RSAPKCS1SignatureFormatter (signerInfo.Key); ! r.SetHashAlgorithm (hashAlgorithm); ! HashAlgorithm ha = HashAlgorithm.Create (hashAlgorithm); ! byte[] sig = ha.ComputeHash (ci[1][0].Value); ! signerInfo.Signature = r.CreateSignature (sig); ! } } *************** *** 799,802 **** --- 898,907 ---- return (byte[]) signature.Clone (); } + + set { + if (value != null) { + signature = (byte[]) value.Clone (); + } + } } *************** *** 824,829 **** signerInfo.Add (AlgorithmIdentifier (hashOid)); // authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL, ! ASN1 aa = signerInfo.Add (new ASN1 (0xA0)); if (authenticatedAttributes.Count > 0) { foreach (ASN1 attr in authenticatedAttributes) aa.Add (attr); --- 929,935 ---- signerInfo.Add (AlgorithmIdentifier (hashOid)); // authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL, ! ASN1 aa = null; if (authenticatedAttributes.Count > 0) { + aa = signerInfo.Add (new ASN1 (0xA0)); foreach (ASN1 attr in authenticatedAttributes) aa.Add (attr); *************** *** 833,843 **** signerInfo.Add (AlgorithmIdentifier (PKCS7.Oid.rsaEncryption)); ! RSAPKCS1SignatureFormatter r = new RSAPKCS1SignatureFormatter (key); ! r.SetHashAlgorithm (hashAlgorithm); ! byte[] tbs = aa.GetBytes (); ! tbs [0] = 0x31; // not 0xA0 for signature ! HashAlgorithm ha = HashAlgorithm.Create (hashAlgorithm); ! byte[] tbsHash = ha.ComputeHash (tbs); ! signature = r.CreateSignature (tbsHash); } else if (key is DSA) { --- 939,952 ---- signerInfo.Add (AlgorithmIdentifier (PKCS7.Oid.rsaEncryption)); ! if (aa != null) { ! // Calculate the signature here; otherwise it must be set from SignedData ! RSAPKCS1SignatureFormatter r = new RSAPKCS1SignatureFormatter (key); ! r.SetHashAlgorithm (hashAlgorithm); ! byte[] tbs = aa.GetBytes (); ! tbs [0] = 0x31; // not 0xA0 for signature ! HashAlgorithm ha = HashAlgorithm.Create (hashAlgorithm); ! byte[] tbsHash = ha.ComputeHash (tbs); ! signature = r.CreateSignature (tbsHash); ! } } else if (key is DSA) { Index: ASN1Convert.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security/ASN1Convert.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ASN1Convert.cs 9 May 2004 12:04:00 -0000 1.2 --- ASN1Convert.cs 20 Jul 2004 17:44:53 -0000 1.3 *************** *** 11,14 **** --- 11,35 ---- // + // + // 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.Collections; *************** *** 43,52 **** // UTCTIME return new ASN1 (0x17, Encoding.ASCII.GetBytes ( ! dt.ToString ("yyMMddHHmmss", CultureInfo.InvariantCulture) + "Z")); } else { // GENERALIZEDTIME return new ASN1 (0x18, Encoding.ASCII.GetBytes ( ! dt.ToString ("yyyyMMddHHmmss", CultureInfo.InvariantCulture) + "Z")); } } --- 64,75 ---- // UTCTIME return new ASN1 (0x17, Encoding.ASCII.GetBytes ( ! dt.ToUniversalTime ().ToString ("yyMMddHHmmss", ! CultureInfo.InvariantCulture) + "Z")); } else { // GENERALIZEDTIME return new ASN1 (0x18, Encoding.ASCII.GetBytes ( ! dt.ToUniversalTime ().ToString ("yyyyMMddHHmmss", ! CultureInfo.InvariantCulture) + "Z")); } } *************** *** 55,71 **** { byte[] integer = BitConverterLE.GetBytes (value); ! int x = 3; ! while (integer [x] == 0x00) ! x--; ASN1 asn1 = new ASN1 (0x02); ! ! byte[] smallerInt = new byte [x + 1]; ! int index = smallerInt.Length - 1; ! for (int i = 0; i < smallerInt.Length; i++) { ! smallerInt [index] = integer [i]; ! index--; } - asn1.Value = smallerInt; - return asn1; } --- 78,99 ---- { byte[] integer = BitConverterLE.GetBytes (value); ! Array.Reverse (integer); ! int x = 0; ! while ((x < integer.Length) && (integer [x] == 0x00)) ! x++; ASN1 asn1 = new ASN1 (0x02); ! switch (x) { ! case 0: ! asn1.Value = integer; ! break; ! case 4: ! asn1.Value = new byte [0]; ! break; ! default: ! byte[] smallerInt = new byte [4 - x]; ! Buffer.BlockCopy (integer, x, smallerInt, 0, smallerInt.Length); ! asn1.Value = smallerInt; ! break; } return asn1; } *************** *** 73,76 **** --- 101,107 ---- static public ASN1 FromOid (string oid) { + if (oid == null) + throw new ArgumentNullException ("oid"); + return new ASN1 (CryptoConfig.EncodeOID (oid)); } *************** *** 78,87 **** static public ASN1 FromUnsignedBigInteger (byte[] big) { ! if (big [0] == 0x00) { ! // this first byte is added so we're sure it's an unsigned integer // however we can't feed it into RSAParameters or DSAParameters int length = big.Length + 1; byte[] uinteger = new byte [length]; ! Buffer.BlockCopy (big, 0, uinteger, 1, length); big = uinteger; } --- 109,121 ---- static public ASN1 FromUnsignedBigInteger (byte[] big) { ! if (big == null) ! throw new ArgumentNullException ("big"); ! ! if (big [0] != 0x00) { ! // this first byte is added so we're sure this is an unsigned integer // however we can't feed it into RSAParameters or DSAParameters int length = big.Length + 1; byte[] uinteger = new byte [length]; ! Buffer.BlockCopy (big, 0, uinteger, 1, length - 1); big = uinteger; } *************** *** 91,96 **** static public int ToInt32 (ASN1 asn1) { if (asn1.Tag != 0x02) ! throw new NotSupportedException ("Only integer can be converted"); int x = 0; for (int i=0; i < asn1.Value.Length; i++) --- 125,133 ---- static public int ToInt32 (ASN1 asn1) { + if (asn1 == null) + throw new ArgumentNullException ("asn1"); if (asn1.Tag != 0x02) ! throw new FormatException ("Only integer can be converted"); ! int x = 0; for (int i=0; i < asn1.Value.Length; i++) *************** *** 103,106 **** --- 140,146 ---- static public string ToOid (ASN1 asn1) { + if (asn1 == null) + throw new ArgumentNullException ("asn1"); + byte[] aOID = asn1.Value; StringBuilder sb = new StringBuilder (); *************** *** 130,133 **** --- 170,176 ---- static public DateTime ToDateTime (ASN1 time) { + if (time == null) + throw new ArgumentNullException ("time"); + string t = Encoding.ASCII.GetString (time.Value); // to support both UTCTime and GeneralizedTime (and not so common format) Index: BitConverterLE.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security/BitConverterLE.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BitConverterLE.cs 9 May 2004 12:04:00 -0000 1.1 --- BitConverterLE.cs 20 Jul 2004 17:44:53 -0000 1.2 *************** *** 7,10 **** --- 7,31 ---- // + // + // 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; Index: ASN1.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security/ASN1.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ASN1.cs 9 May 2004 12:04:00 -0000 1.2 --- ASN1.cs 20 Jul 2004 17:44:53 -0000 1.3 *************** *** 11,14 **** --- 11,35 ---- // + // + // 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.Collections; |
From: Carlos G. Á. <car...@us...> - 2004-07-20 17:44:46
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime.Generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18240 Modified Files: NextPrimeFinder.cs PrimeGeneratorBase.cs SequentialSearchPrimeGeneratorBase.cs Log Message: Prepare for beta 7 Index: PrimeGeneratorBase.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime.Generator/PrimeGeneratorBase.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PrimeGeneratorBase.cs 9 May 2004 11:59:35 -0000 1.2 --- PrimeGeneratorBase.cs 20 Jul 2004 17:44:36 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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; Index: NextPrimeFinder.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime.Generator/NextPrimeFinder.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NextPrimeFinder.cs 9 May 2004 11:59:35 -0000 1.2 --- NextPrimeFinder.cs 20 Jul 2004 17:44:36 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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; Index: SequentialSearchPrimeGeneratorBase.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime.Generator/SequentialSearchPrimeGeneratorBase.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SequentialSearchPrimeGeneratorBase.cs 12 Jun 2004 09:28:27 -0000 1.3 --- SequentialSearchPrimeGeneratorBase.cs 20 Jul 2004 17:44:36 -0000 1.4 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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 Mono.Math.Prime; |
From: Carlos G. Á. <car...@us...> - 2004-07-20 17:44:05
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18116 Modified Files: ConfidenceFactor.cs PrimalityTests.cs Log Message: Prepare for beta 7 Index: ConfidenceFactor.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime/ConfidenceFactor.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConfidenceFactor.cs 9 May 2004 11:59:12 -0000 1.2 --- ConfidenceFactor.cs 20 Jul 2004 17:43:54 -0000 1.3 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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; Index: PrimalityTests.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime/PrimalityTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PrimalityTests.cs 12 Jun 2004 09:27:51 -0000 1.3 --- PrimalityTests.cs 20 Jul 2004 17:43:54 -0000 1.4 *************** *** 8,11 **** --- 8,32 ---- // + // + // 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; |
From: Carlos G. Á. <car...@us...> - 2004-07-20 17:43:36
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18033 Modified Files: BigInteger.cs Log Message: Prepare for beta 7 Index: BigInteger.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math/BigInteger.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BigInteger.cs 12 Jun 2004 09:27:31 -0000 1.3 --- BigInteger.cs 20 Jul 2004 17:43:26 -0000 1.4 *************** *** 14,17 **** --- 14,38 ---- // All rights reserved. + // + // 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.Security.Cryptography; |
From: Carlos G. Á. <car...@us...> - 2004-06-14 15:00:45
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15737 Modified Files: PgSqlClient.build Log Message: Updated build file Index: PgSqlClient.build =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.build,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PgSqlClient.build 16 Feb 2004 15:32:27 -0000 1.14 --- PgSqlClient.build 14 Jun 2004 15:00:27 -0000 1.15 *************** *** 8,12 **** <!-- Build properties --> <property name="build.debug" value="true" /> ! <property name="build.define" value="_DEBUG" /> <!-- Paths properties --> --- 8,12 ---- <!-- Build properties --> <property name="build.debug" value="true" /> ! <property name="build.define" value="DEBUG" /> <!-- Paths properties --> *************** *** 158,162 **** <!-- compile PostgreSql.Data.PgSqlClient --> ! <csc output="${build.dir}\${project.FormalName}.dll" target="library" define="${build.define}"> <sources> <includes name="${src.dir}/**/*.cs" /> --- 158,162 ---- <!-- compile PostgreSql.Data.PgSqlClient --> ! <csc output="${build.dir}\${project.FormalName}.dll" target="library" define="${build.define}" debug="${build.debug}"> <sources> <includes name="${src.dir}/**/*.cs" /> |
From: Carlos G. Á. <car...@us...> - 2004-06-12 14:26:19
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23773 Modified Files: PgCommand.cs Log Message: 2004-06-12 Carlos Guzman Alvarez <car...@te...> * PostgreSql.Data.PgSqlClient/PgCommand.cs: - Fix regex usage (it waqs working in .NET but not in mono i have sent an email to the mono list and i'm wainting for response for now if it's a mono problem) Index: PgCommand.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommand.cs,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** PgCommand.cs 12 Jun 2004 14:18:57 -0000 1.38 --- PgCommand.cs 12 Jun 2004 14:26:10 -0000 1.39 *************** *** 682,686 **** string pattern = @"(('[^']*?\@[^']*')*[^'@]*?)*(?<param>@\w+)*([^'@]*?('[^']*?\@*[^']*'))*"; ! Regex r = new Regex(pattern, RegexOptions.ExplicitCapture | RegexOptions.Multiline); MatchEvaluator me = new MatchEvaluator(matchEvaluator); --- 682,686 ---- string pattern = @"(('[^']*?\@[^']*')*[^'@]*?)*(?<param>@\w+)*([^'@]*?('[^']*?\@*[^']*'))*"; ! Regex r = new Regex(pattern, RegexOptions.ExplicitCapture); MatchEvaluator me = new MatchEvaluator(matchEvaluator); |
From: Carlos G. Á. <car...@us...> - 2004-06-12 14:20:34
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18704 Modified Files: changelog.txt Log Message: 2004-06-12 Carlos Guzman Alvarez <car...@te...> * PostgreSql.Data.PgSqlClient/PgCommand.cs: - Fix regex usage (it waqs working in .NET but not in mono i have sent an email to the mono list and i'm wainting for response for now if it's a mono problem) Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** changelog.txt 10 Jun 2004 08:34:10 -0000 1.120 --- changelog.txt 12 Jun 2004 14:20:24 -0000 1.121 *************** *** 2,5 **** --- 2,13 ---- ------------------------------------------------------- + 2004-06-12 Carlos Guzman Alvarez <car...@te...> + + * PostgreSql.Data.PgSqlClient/PgCommand.cs: + + - Fix regex usage (it waqs working in .NET but not in mono + i have sent an email to the mono list and i'm wainting for response + for now if it's a mono problem) + 2004-06-09 Carlos Guzman Alvarez <car...@te...> |
From: Carlos G. Á. <car...@us...> - 2004-06-12 14:19:06
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17119 Modified Files: PgCommand.cs Log Message: 2004-06-12 Carlos Guzman Alvarez <car...@te...> * PostgreSql.Data.PgSqlClient/PgCommand.cs: - Fix regex usage (it waqs working in .NET but not in mono i have sent an email to the mono list and i'm wainting for response for now if it's a mono problem) Index: PgCommand.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommand.cs,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** PgCommand.cs 10 Jun 2004 08:33:01 -0000 1.37 --- PgCommand.cs 12 Jun 2004 14:18:57 -0000 1.38 *************** *** 545,549 **** this.statement = null; ! if ((behavior & CommandBehavior.SingleResult) != CommandBehavior.SingleResult) { this.actualCommand++; --- 545,549 ---- this.statement = null; ! if ((this.commandBehavior & CommandBehavior.SingleResult) != CommandBehavior.SingleResult) { this.actualCommand++; *************** *** 682,686 **** string pattern = @"(('[^']*?\@[^']*')*[^'@]*?)*(?<param>@\w+)*([^'@]*?('[^']*?\@*[^']*'))*"; ! Regex r = new Regex(pattern, RegexOptions.ExplicitCapture); MatchEvaluator me = new MatchEvaluator(matchEvaluator); --- 682,686 ---- string pattern = @"(('[^']*?\@[^']*')*[^'@]*?)*(?<param>@\w+)*([^'@]*?('[^']*?\@*[^']*'))*"; ! Regex r = new Regex(pattern, RegexOptions.ExplicitCapture | RegexOptions.Multiline); MatchEvaluator me = new MatchEvaluator(matchEvaluator); *************** *** 707,711 **** this.namedParameters.Add(g.Value); ! replace = "$" + ((this.matchIndex++) + 1).ToString(); this.matchReplaces.Add(g.Value, replace); --- 707,711 ---- this.namedParameters.Add(g.Value); ! replace = "$$" + ((this.matchIndex++) + 1).ToString(); this.matchReplaces.Add(g.Value, replace); |
From: Carlos G. Á. <car...@us...> - 2004-06-12 09:29:10
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2103 Modified Files: PKCS8.cs ARC4Managed.cs Log Message: Updated Mono.Security sources to mono Beta 2 Index: ARC4Managed.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography/ARC4Managed.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ARC4Managed.cs 5 Mar 2004 23:15:21 -0000 1.2 --- ARC4Managed.cs 12 Jun 2004 09:29:01 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- using System; + using System.Globalization; using System.Security.Cryptography; *************** *** 114,119 **** --- 115,148 ---- } + private void CheckInput (byte[] inputBuffer, int inputOffset, int inputCount) + { + if (inputBuffer == null) + throw new ArgumentNullException ("inputBuffer"); + if (inputOffset < 0) + throw new ArgumentOutOfRangeException ("inputOffset", "< 0"); + if (inputCount < 0) + throw new ArgumentOutOfRangeException ("inputCount", "< 0"); + // ordered to avoid possible integer overflow + if (inputOffset > inputBuffer.Length - inputCount) + throw new ArgumentException ("inputBuffer", "Overflow"); + } + public int TransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) { + CheckInput (inputBuffer, inputOffset, inputCount); + // check output parameters + if (outputBuffer == null) + throw new ArgumentNullException ("outputBuffer"); + if (outputOffset < 0) + throw new ArgumentOutOfRangeException ("outputOffset", "< 0"); + // ordered to avoid possible integer overflow + if (outputOffset > outputBuffer.Length - inputCount) + throw new ArgumentException ("outputBuffer", "Overflow"); + + return InternalTransformBlock (inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset); + } + + private int InternalTransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) + { byte xorIndex; for (int counter = 0; counter < inputCount; counter ++) { *************** *** 133,138 **** public byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount) { byte[] output = new byte [inputCount]; ! TransformBlock (inputBuffer, inputOffset, inputCount, output, 0); return output; } --- 162,169 ---- public byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount) { + CheckInput (inputBuffer, inputOffset, inputCount); + byte[] output = new byte [inputCount]; ! InternalTransformBlock (inputBuffer, inputOffset, inputCount, output, 0); return output; } Index: PKCS8.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Cryptography/PKCS8.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PKCS8.cs 9 May 2004 12:04:34 -0000 1.2 --- PKCS8.cs 12 Jun 2004 09:29:00 -0000 1.3 *************** *** 119,123 **** get { return _version; } set { ! if (_version < 0) throw new ArgumentOutOfRangeException ("negative version"); _version = value; --- 119,123 ---- get { return _version; } set { ! if (value < 0) throw new ArgumentOutOfRangeException ("negative version"); _version = value; |
From: Carlos G. Á. <car...@us...> - 2004-06-12 09:28:35
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime.Generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1763 Modified Files: SequentialSearchPrimeGeneratorBase.cs Log Message: Updated Mono.Security sources to mono Beta 2 Index: SequentialSearchPrimeGeneratorBase.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Math.Prime.Generator/SequentialSearchPrimeGeneratorBase.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SequentialSearchPrimeGeneratorBase.cs 9 May 2004 11:59:35 -0000 1.2 --- SequentialSearchPrimeGeneratorBase.cs 12 Jun 2004 09:28:27 -0000 1.3 *************** *** 69,73 **** // STEP 2.2 Sieve out all numbers divisible by the primes <= DivisionBound // ! for (int p = 9; p < SmallPrimes.Length && SmallPrimes [p] <= DivisionBound; p++) { if (curVal % SmallPrimes [p] == 0) goto biNotPrime; --- 69,73 ---- // STEP 2.2 Sieve out all numbers divisible by the primes <= DivisionBound // ! for (int p = 10; p < SmallPrimes.Length && SmallPrimes [p] <= DivisionBound; p++) { if (curVal % SmallPrimes [p] == 0) goto biNotPrime; *************** *** 77,87 **** // STEP 2.3 Is the potential prime acceptable? // ! if (!IsPrimeAcceptable (curVal, context)) goto biNotPrime; // // STEP 2.4 Filter out all primes that pass this step with a primality test // ! if (PrimalityTest (curVal, Confidence)) return curVal; ! // --- 77,88 ---- // STEP 2.3 Is the potential prime acceptable? // ! if (!IsPrimeAcceptable (curVal, context)) ! goto biNotPrime; // // STEP 2.4 Filter out all primes that pass this step with a primality test // ! if (PrimalityTest (curVal, Confidence)) ! return curVal; // *************** *** 90,94 **** biNotPrime: pMod1 += 2; ! if (pMod1 >= primeProd1) pMod1 -= primeProd1; curVal.Incr2 (); } --- 91,96 ---- biNotPrime: pMod1 += 2; ! if (pMod1 >= primeProd1) ! pMod1 -= primeProd1; curVal.Incr2 (); } |