[pgsqlclient-checkins] pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls SslAsyn
Status: Inactive
Brought to you by:
carlosga_fb
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19415 Modified Files: Alert.cs CipherAlgorithmType.cs CipherSuite.cs CipherSuiteCollection.cs CipherSuiteFactory.cs ClientContext.cs ClientRecordProtocol.cs ContentType.cs Context.cs DebugHelper.cs ExchangeAlgorithmType.cs HandshakeState.cs HashAlgorithmType.cs RecordProtocol.cs RSASslSignatureDeformatter.cs RSASslSignatureFormatter.cs SecurityCompressionType.cs SecurityProtocolType.cs ServerContext.cs ServerRecordProtocol.cs SslCipherSuite.cs SslClientStream.cs SslHandshakeHash.cs SslServerStream.cs TlsCipherSuite.cs TlsClientSettings.cs TlsException.cs TlsServerSettings.cs TlsStream.cs Added Files: SslAsyncResult.cs SslClientBufferedStream.cs Log Message: Updated with latest patches form Sebastien Pouliot Index: HashAlgorithmType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/HashAlgorithmType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HashAlgorithmType.cs 15 Apr 2005 13:00:59 -0000 1.4 --- HashAlgorithmType.cs 23 Apr 2005 10:11:12 -0000 1.5 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: ClientContext.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/ClientContext.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClientContext.cs 15 Apr 2005 13:00:59 -0000 1.6 --- ClientContext.cs 23 Apr 2005 10:11:12 -0000 1.7 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: TlsStream.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/TlsStream.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TlsStream.cs 15 Apr 2005 13:00:59 -0000 1.5 --- TlsStream.cs 23 Apr 2005 10:11:25 -0000 1.6 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: TlsCipherSuite.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TlsCipherSuite.cs 15 Apr 2005 13:00:59 -0000 1.11 --- TlsCipherSuite.cs 23 Apr 2005 10:11:25 -0000 1.12 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: ServerRecordProtocol.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ServerRecordProtocol.cs 15 Apr 2005 13:00:59 -0000 1.9 --- ServerRecordProtocol.cs 23 Apr 2005 10:11:13 -0000 1.10 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: CipherSuite.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CipherSuite.cs 15 Apr 2005 13:00:59 -0000 1.15 --- CipherSuite.cs 23 Apr 2005 10:11:12 -0000 1.16 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: CipherSuiteCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CipherSuiteCollection.cs 15 Apr 2005 13:00:59 -0000 1.6 --- CipherSuiteCollection.cs 23 Apr 2005 10:11:12 -0000 1.7 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: DebugHelper.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DebugHelper.cs 15 Apr 2005 13:00:59 -0000 1.3 --- DebugHelper.cs 23 Apr 2005 10:11:12 -0000 1.4 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: RSASslSignatureFormatter.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureFormatter.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RSASslSignatureFormatter.cs 15 Apr 2005 13:00:59 -0000 1.4 --- RSASslSignatureFormatter.cs 23 Apr 2005 10:11:13 -0000 1.5 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: CipherSuiteFactory.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CipherSuiteFactory.cs 15 Apr 2005 13:00:59 -0000 1.5 --- CipherSuiteFactory.cs 23 Apr 2005 10:11:12 -0000 1.6 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: SslClientStream.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** SslClientStream.cs 15 Apr 2005 13:00:59 -0000 1.28 --- SslClientStream.cs 23 Apr 2005 10:11:13 -0000 1.29 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // *************** *** 30,33 **** --- 30,34 ---- using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; + using System.Threading; using Mono.Security.Protocol.Tls.Handshake; *************** *** 51,54 **** --- 52,56 ---- string targetHost); + delegate int ReadDelegate (byte [] buffer, int offset, int count); #endregion *************** *** 66,70 **** private Stream innerStream; ! private BufferedStream inputBuffer; private ClientContext context; private ClientRecordProtocol protocol; --- 68,72 ---- private Stream innerStream; ! private MemoryStream inputBuffer; private ClientContext context; private ClientRecordProtocol protocol; *************** *** 72,77 **** --- 74,81 ---- private bool disposed; private bool checkCertRevocationStatus; + private object negotiate; private object read; private object write; + private ReadDelegate rd; #endregion *************** *** 335,341 **** clientCertificates); ! this.inputBuffer = new BufferedStream(new MemoryStream()); this.innerStream = stream; this.ownsStream = ownsStream; this.read = new object (); this.write = new object (); --- 339,346 ---- clientCertificates); ! this.inputBuffer = new MemoryStream(); this.innerStream = stream; this.ownsStream = ownsStream; + this.negotiate = new object (); this.read = new object (); this.write = new object (); *************** *** 405,409 **** object state) { ! this.checkDisposed(); if (buffer == null) --- 410,414 ---- object state) { ! this.checkDisposed (); if (buffer == null) *************** *** 428,440 **** } ! lock (this) { ! if (this.context.HandshakeState == HandshakeState.None) { ! this.NegotiateHandshake(); } } ! IAsyncResult asyncResult; lock (this.read) --- 433,451 ---- } ! if (this.context.HandshakeState == HandshakeState.None) { ! // Note: Async code may have problem if they can't ensure that ! // the Negotiate phase isn't done during a read operation. ! // System.Net.HttpWebRequest protects itself from that problem ! lock (this.negotiate) { ! if (this.context.HandshakeState == HandshakeState.None) ! { ! this.NegotiateHandshake(); ! } } } ! IAsyncResult asyncResult = null; lock (this.read) *************** *** 451,493 **** if (!this.context.ConnectionEnd) { ! // Check if we have space in the middle buffer ! // if not Read next TLS record and update the inputBuffer ! while ((this.inputBuffer.Length - this.inputBuffer.Position) < count) { ! // Read next record and write it into the inputBuffer ! long position = this.inputBuffer.Position; ! byte[] record = this.protocol.ReceiveRecord(); ! ! if (record != null && record.Length > 0) ! { ! // Write new data to the inputBuffer ! this.inputBuffer.Seek(0, SeekOrigin.End); ! this.inputBuffer.Write(record, 0, record.Length); ! // Restore buffer position ! this.inputBuffer.Seek(position, SeekOrigin.Begin); ! } ! else ! { ! if (record == null) ! { ! break; ! } ! } ! // TODO: Review if we need to check the Length ! // property of the innerStream for other types ! // of streams, to check that there are data available ! // for read ! if (this.innerStream is NetworkStream && ! !((NetworkStream)this.innerStream).DataAvailable) { ! break; } } } ! asyncResult = this.inputBuffer.BeginRead( ! buffer, offset, count, callback, state); } catch (TlsException ex) --- 462,489 ---- if (!this.context.ConnectionEnd) { ! if ((this.inputBuffer.Length == this.inputBuffer.Position) && (count > 0)) { ! // bigger than max record length for SSL/TLS ! byte[] recbuf = new byte[16384]; ! // this will read data from the network until we have (at least) one ! // record to send back to the caller ! this.innerStream.BeginRead (recbuf, 0, recbuf.Length, ! new AsyncCallback (NetworkReadCallback), recbuf); ! if (!recordEvent.WaitOne (300000, false)) // 5 minutes { ! // FAILSAFE ! DebugHelper.WriteLine ("TIMEOUT length {0}, position {1}, count {2} - {3}\n{4}", ! this.inputBuffer.Length, this.inputBuffer.Position, count, GetHashCode (), ! Environment.StackTrace); ! throw new TlsException (AlertDescription.InternalError); } } } ! // return the record(s) to the caller ! rd = new ReadDelegate (this.inputBuffer.Read); ! asyncResult = rd.BeginInvoke (buffer, offset, count, callback, state); } catch (TlsException ex) *************** *** 502,505 **** --- 498,502 ---- throw new IOException("IO exception during read."); } + } *************** *** 507,510 **** --- 504,599 ---- } + private ManualResetEvent recordEvent = new ManualResetEvent (false); + private MemoryStream recordStream = new MemoryStream (); + + // read encrypted data until we have enough to decrypt (at least) one + // record and return are the records (may be more than one) we have + private void NetworkReadCallback (IAsyncResult result) + { + byte[] recbuf = (byte[])result.AsyncState; + int n = innerStream.EndRead (result); + if (n > 0) + { + // add the just received data to the waiting data + recordStream.Write (recbuf, 0, n); + } + + bool dataToReturn = false; + long pos = recordStream.Position; + + recordStream.Position = 0; + byte[] record = null; + + // don't try to decode record unless we have at least 5 bytes + // i.e. type (1), protocol (2) and length (2) + if (recordStream.Length >= 5) + { + record = this.protocol.ReceiveRecord (recordStream); + } + + // a record of 0 length is valid (and there may be more record after it) + while (record != null) + { + // we probably received more stuff after the record, and we must keep it! + long remainder = recordStream.Length - recordStream.Position; + byte[] outofrecord = null; + if (remainder > 0) + { + outofrecord = new byte[remainder]; + recordStream.Read (outofrecord, 0, outofrecord.Length); + } + + long position = this.inputBuffer.Position; + + if (record.Length > 0) + { + // Write new data to the inputBuffer + this.inputBuffer.Seek (0, SeekOrigin.End); + this.inputBuffer.Write (record, 0, record.Length); + + // Restore buffer position + this.inputBuffer.Seek (position, SeekOrigin.Begin); + dataToReturn = true; + } + + recordStream.SetLength (0); + record = null; + + if (remainder > 0) + { + recordStream.Write (outofrecord, 0, outofrecord.Length); + // type (1), protocol (2) and length (2) + if (recordStream.Length >= 5) + { + // try to see if another record is available + recordStream.Position = 0; + record = this.protocol.ReceiveRecord (recordStream); + if (record == null) + pos = recordStream.Length; + } + else + pos = remainder; + } + else + pos = 0; + } + + if (!dataToReturn && (n > 0)) + { + // there is no record to return to caller and (possibly) more data waiting + // so continue reading from network (and appending to stream) + recordStream.Position = recordStream.Length; + this.innerStream.BeginRead (recbuf, 0, recbuf.Length, + new AsyncCallback (NetworkReadCallback), recbuf); + } + else + { + // we have record(s) to return -or- no more available to read from network + // reset position for further reading + recordStream.Position = pos; + recordEvent.Set (); + } + } + public override IAsyncResult BeginWrite( byte[] buffer, *************** *** 537,545 **** } ! lock (this) { ! if (this.context.HandshakeState == HandshakeState.None) { ! this.NegotiateHandshake(); } } --- 626,637 ---- } ! if (this.context.HandshakeState == HandshakeState.None) { ! lock (this.negotiate) { ! if (this.context.HandshakeState == HandshakeState.None) ! { ! this.NegotiateHandshake(); ! } } } *************** *** 584,588 **** } ! return this.inputBuffer.EndRead(asyncResult); } --- 676,681 ---- } ! recordEvent.Reset (); ! return this.rd.EndInvoke (asyncResult); } *************** *** 690,762 **** internal void NegotiateHandshake() { ! lock (this) { ! try { ! if (this.context.HandshakeState != HandshakeState.None) ! { ! this.context.Clear(); ! } ! // Obtain supported cipher suites ! this.context.SupportedCiphers = CipherSuiteFactory.GetSupportedCiphers(this.context.SecurityProtocol); ! // Send client hello ! this.protocol.SendRecord(HandshakeType.ClientHello); ! // Read server response ! while (this.context.LastHandshakeMsg != HandshakeType.ServerHelloDone) ! { ! // Read next record ! this.protocol.ReceiveRecord(); ! } ! // Send client certificate if requested ! if (this.context.ServerSettings.CertificateRequest) ! { ! this.protocol.SendRecord(HandshakeType.Certificate); ! } ! // Send Client Key Exchange ! this.protocol.SendRecord(HandshakeType.ClientKeyExchange); ! // Now initialize session cipher with the generated keys ! this.context.Cipher.InitializeCipher(); ! // Send certificate verify if requested ! if (this.context.ServerSettings.CertificateRequest) ! { ! this.protocol.SendRecord(HandshakeType.CertificateVerify); ! } ! // Send Cipher Spec protocol ! this.protocol.SendChangeCipherSpec(); ! // Read record until server finished is received ! while (this.context.HandshakeState != HandshakeState.Finished) ! { ! // If all goes well this will process messages: ! // Change Cipher Spec ! // Server finished ! this.protocol.ReceiveRecord(); ! } ! ! // Clear Key Info ! this.context.ClearKeyInfo(); ! } ! catch (TlsException ex) { ! this.protocol.SendAlert(ex.Alert); ! this.Close(); ! ! throw new IOException("The authentication or decryption has failed."); } - catch (Exception) - { - this.protocol.SendAlert(AlertDescription.InternalError); - this.Close(); ! throw new IOException("The authentication or decryption has failed."); ! } } } --- 783,852 ---- internal void NegotiateHandshake() { ! try { ! if (this.context.HandshakeState != HandshakeState.None) { ! this.context.Clear(); ! } ! // Obtain supported cipher suites ! this.context.SupportedCiphers = CipherSuiteFactory.GetSupportedCiphers(this.context.SecurityProtocol); ! // Send client hello ! this.protocol.SendRecord(HandshakeType.ClientHello); ! // Read server response ! while (this.context.LastHandshakeMsg != HandshakeType.ServerHelloDone) ! { ! // Read next record ! this.protocol.ReceiveRecord (this.innerStream); ! } ! // Send client certificate if requested ! if (this.context.ServerSettings.CertificateRequest) ! { ! this.protocol.SendRecord(HandshakeType.Certificate); ! } ! // Send Client Key Exchange ! this.protocol.SendRecord(HandshakeType.ClientKeyExchange); ! // Now initialize session cipher with the generated keys ! this.context.Cipher.InitializeCipher(); ! // Send certificate verify if requested ! if (this.context.ServerSettings.CertificateRequest) ! { ! this.protocol.SendRecord(HandshakeType.CertificateVerify); ! } ! // Send Cipher Spec protocol ! this.protocol.SendChangeCipherSpec(); ! // Read record until server finished is received ! while (this.context.HandshakeState != HandshakeState.Finished) { ! // If all goes well this will process messages: ! // Change Cipher Spec ! // Server finished ! this.protocol.ReceiveRecord (this.innerStream); } ! // Clear Key Info ! this.context.ClearKeyInfo(); ! } ! catch (TlsException ex) ! { ! this.protocol.SendAlert(ex.Alert); ! this.Close(); ! ! throw new IOException("The authentication or decryption has failed."); ! } ! catch (Exception) ! { ! this.protocol.SendAlert(AlertDescription.InternalError); ! this.Close(); ! ! throw new IOException("The authentication or decryption has failed."); } } *************** *** 811,812 **** --- 901,903 ---- } } + Index: SslHandshakeHash.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/SslHandshakeHash.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SslHandshakeHash.cs 15 Apr 2005 13:00:59 -0000 1.6 --- SslHandshakeHash.cs 23 Apr 2005 10:11:25 -0000 1.7 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: RecordProtocol.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** RecordProtocol.cs 15 Apr 2005 13:00:59 -0000 1.28 --- RecordProtocol.cs 23 Apr 2005 10:11:12 -0000 1.29 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // *************** *** 73,77 **** #region Reveive Record Methods ! public byte[] ReceiveRecord() { if (this.context.ConnectionEnd) --- 73,77 ---- #region Reveive Record Methods ! public byte[] ReceiveRecord(Stream record) { if (this.context.ConnectionEnd) *************** *** 81,87 **** "The session is finished and it's no longer valid."); } ! // Try to read the Record Content Type ! int type = this.innerStream.ReadByte(); if (type == -1) { --- 81,87 ---- "The session is finished and it's no longer valid."); } ! // Try to read the Record Content Type ! int type = record.ReadByte (); if (type == -1) { *************** *** 93,100 **** ContentType contentType = (ContentType)type; ! byte[] buffer = this.ReadRecordBuffer(type); - TlsStream message = new TlsStream(buffer); - // Decrypt message contents if needed if (contentType == ContentType.Alert && buffer.Length == 2) --- 93,103 ---- ContentType contentType = (ContentType)type; ! byte[] buffer = this.ReadRecordBuffer(type, record); ! if (buffer == null) ! { ! // record incomplete (at the moment) ! return null; ! } // Decrypt message contents if needed if (contentType == ContentType.Alert && buffer.Length == 2) *************** *** 105,122 **** if (this.context.IsActual && contentType != ContentType.ChangeCipherSpec) { ! message = this.decryptRecordFragment(contentType, message.ToArray()); ! ! DebugHelper.WriteLine("Decrypted record data", message.ToArray()); } } // Process record - byte[] result = message.ToArray(); - switch (contentType) { case ContentType.Alert: ! this.ProcessAlert((AlertLevel)message.ReadByte(), (AlertDescription)message.ReadByte()); ! result = null; break; --- 108,127 ---- if (this.context.IsActual && contentType != ContentType.ChangeCipherSpec) { ! buffer = this.decryptRecordFragment(contentType, buffer); ! DebugHelper.WriteLine("Decrypted record data", buffer); } } // Process record switch (contentType) { case ContentType.Alert: ! this.ProcessAlert((AlertLevel)buffer [0], (AlertDescription)buffer [1]); ! if (record.CanSeek) ! { ! // don't reprocess that memory block ! record.SetLength (0); ! } ! buffer = null; break; *************** *** 129,132 **** --- 134,138 ---- case ContentType.Handshake: + TlsStream message = new TlsStream (buffer); while (!message.EOF) { *************** *** 135,139 **** // Update handshakes of current messages ! this.context.HandshakeMessages.Write(message.ToArray()); break; --- 141,145 ---- // Update handshakes of current messages ! this.context.HandshakeMessages.Write(buffer); break; *************** *** 150,166 **** "Unknown record received from server."); } ! this.context.HandshakeMessages.Write (result); break; } ! return result; } ! private byte[] ReadRecordBuffer(int contentType) { switch (contentType) { case 0x80: ! return this.ReadClientHelloV2(); default: --- 156,172 ---- "Unknown record received from server."); } ! this.context.HandshakeMessages.Write (buffer); break; } ! return buffer; } ! private byte[] ReadRecordBuffer (int contentType, Stream record) { switch (contentType) { case 0x80: ! return this.ReadClientHelloV2(record); default: *************** *** 169,181 **** throw new TlsException(AlertDescription.DecodeError); } ! return this.ReadStandardRecordBuffer(); } } ! private byte[] ReadClientHelloV2() { ! int msgLength = this.innerStream.ReadByte(); ! byte[] message = new byte [msgLength]; ! this.innerStream.Read (message, 0, msgLength); int msgType = message [0]; --- 175,193 ---- throw new TlsException(AlertDescription.DecodeError); } ! return this.ReadStandardRecordBuffer(record); } } ! private byte[] ReadClientHelloV2 (Stream record) { ! int msgLength = record.ReadByte (); ! // process further only if the whole record is available ! if (record.CanSeek && (msgLength + 1 > record.Length)) ! { ! return null; ! } ! ! byte[] message = new byte[msgLength]; ! record.Read (message, 0, msgLength); int msgType = message [0]; *************** *** 232,239 **** } ! private byte[] ReadStandardRecordBuffer() { ! short protocol = this.ReadShort(); ! short length = this.ReadShort(); // Read Record data --- 244,258 ---- } ! private byte[] ReadStandardRecordBuffer (Stream record) { ! short protocol = this.ReadShort(record); ! short length = this.ReadShort(record); ! ! // process further only if the whole record is available ! // note: the first 5 bytes aren't part of the length ! if (record.CanSeek && (length + 5 > record.Length)) ! { ! return null; ! } // Read Record data *************** *** 242,246 **** while (received != length) { ! received += this.innerStream.Read(buffer, received, buffer.Length - received); } --- 261,265 ---- while (received != length) { ! received += record.Read(buffer, received, buffer.Length - received); } *************** *** 257,264 **** } ! private short ReadShort() { byte[] b = new byte[2]; ! this.innerStream.Read(b, 0, b.Length); short val = BitConverter.ToInt16(b, 0); --- 276,283 ---- } ! private short ReadShort(Stream record) { byte[] b = new byte[2]; ! record.Read(b, 0, b.Length); short val = BitConverter.ToInt16(b, 0); *************** *** 460,464 **** } ! private TlsStream decryptRecordFragment( ContentType contentType, byte[] fragment) --- 479,483 ---- } ! private byte[] decryptRecordFragment( ContentType contentType, byte[] fragment) *************** *** 521,525 **** this.context.ReadSequenceNumber++; ! return new TlsStream(dcrFragment); } --- 540,544 ---- this.context.ReadSequenceNumber++; ! return dcrFragment; } Index: SecurityCompressionType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SecurityCompressionType.cs 15 Apr 2005 13:00:59 -0000 1.4 --- SecurityCompressionType.cs 23 Apr 2005 10:11:13 -0000 1.5 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // --- NEW FILE: SslClientBufferedStream.cs --- // // System.IO.BufferedStream // // Author: // Matt Kimball (ma...@ki...) // Ville Palo <vi...@ko...> // // Copyright (C) 2004 Novell (http://www.novell.com) // // // Copyright (C) 2004 Novell, Inc (http://www.novell.com) // // 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; using System.IO; using System.Runtime.InteropServices; using System.Security.Cryptography.X509Certificates; namespace Mono.Security.Protocol.Tls { public sealed class SslClientBufferedStream : Stream { Stream m_stream; byte[] m_buffer; int m_buffer_pos; int m_buffer_read_ahead; bool m_buffer_reading; private bool disposed = false; public SslClientBufferedStream (Stream stream, string targetHost, bool ownsStream, SecurityProtocolType securityProtocolType, X509CertificateCollection clientCertificates) { if (stream == null) throw new ArgumentNullException ("stream"); // LAMESPEC: documented as < 0 if (buffer_size <= 0) throw new ArgumentOutOfRangeException ("buffer_size", "<= 0"); if (!stream.CanRead && !stream.CanWrite) { throw new ObjectDisposedException ( Locale.GetText ("Cannot access a closed Stream.")); } m_stream = stream; m_buffer = new byte [buffer_size]; } public override bool CanRead { get { return m_stream.CanRead; } } public override bool CanWrite { get { return m_stream.CanWrite; } } public override bool CanSeek { get { return m_stream.CanSeek; } } public override long Length { get { Flush (); return m_stream.Length; } } public override long Position { get { CheckObjectDisposedException (); return m_stream.Position - m_buffer_read_ahead + m_buffer_pos; } set { if (value < Position && (Position - value <= m_buffer_pos) && m_buffer_reading) { m_buffer_pos -= (int) (Position - value); } else if (value > Position && (value - Position < m_buffer_read_ahead - m_buffer_pos) && m_buffer_reading) { m_buffer_pos += (int) (value - Position); } else { Flush(); m_stream.Position = value; } } } public override void Close () { if (m_buffer != null) Flush(); m_stream.Close(); m_buffer = null; disposed = true; } public override void Flush () { CheckObjectDisposedException (); if (m_buffer_reading) { if (CanSeek) m_stream.Position = Position; } else if (m_buffer_pos > 0) { m_stream.Write(m_buffer, 0, m_buffer_pos); } m_buffer_read_ahead = 0; m_buffer_pos = 0; } public override long Seek (long offset, SeekOrigin origin) { CheckObjectDisposedException (); if (!CanSeek) { throw new NotSupportedException ( Locale.GetText ("Non seekable stream.")); } Flush (); return m_stream.Seek (offset, origin); } public override void SetLength (long value) { CheckObjectDisposedException (); if (value < 0) throw new ArgumentOutOfRangeException ("value must be positive"); if (!m_stream.CanWrite && !m_stream.CanSeek) throw new NotSupportedException ("the stream cannot seek nor write."); if ((m_stream == null) || (!m_stream.CanRead && !m_stream.CanWrite)) throw new IOException ("the stream is not open"); m_stream.SetLength(value); if (Position > value) Position = value; } public override int ReadByte () { CheckObjectDisposedException (); byte[] b = new byte[1]; if (Read(b, 0, 1) == 1) { return b[0]; } else { return -1; } } public override void WriteByte (byte value) { CheckObjectDisposedException (); byte[] b = new byte[1]; b[0] = value; Write(b, 0, 1); } public override int Read ([In,Out] byte[] array, int offset, int count) { if (array == null) throw new ArgumentNullException ("array"); CheckObjectDisposedException (); if (!m_stream.CanRead) { throw new NotSupportedException ( Locale.GetText ("Cannot read from stream")); } if (offset < 0) throw new ArgumentOutOfRangeException ("offset", "< 0"); if (count < 0) throw new ArgumentOutOfRangeException ("count", "< 0"); // re-ordered to avoid possible integer overflow if (array.Length - offset < count) throw new ArgumentException ("array.Length - offset < count"); if (!m_buffer_reading) { Flush(); m_buffer_reading = true; } if (count <= m_buffer_read_ahead - m_buffer_pos) { Buffer.BlockCopyInternal (m_buffer, m_buffer_pos, array, offset, count); m_buffer_pos += count; if (m_buffer_pos == m_buffer_read_ahead) { m_buffer_pos = 0; m_buffer_read_ahead = 0; } return count; } int ret = m_buffer_read_ahead - m_buffer_pos; Buffer.BlockCopyInternal (m_buffer, m_buffer_pos, array, offset, ret); m_buffer_pos = 0; m_buffer_read_ahead = 0; offset += ret; count -= ret; if (count >= m_buffer.Length) { ret += m_stream.Read(array, offset, count); } else { m_buffer_read_ahead = m_stream.Read(m_buffer, 0, m_buffer.Length); if (count < m_buffer_read_ahead) { Buffer.BlockCopyInternal (m_buffer, 0, array, offset, count); m_buffer_pos = count; ret += count; } else { Buffer.BlockCopyInternal (m_buffer, 0, array, offset, m_buffer_read_ahead); ret += m_buffer_read_ahead; m_buffer_read_ahead = 0; } } return ret; } public override void Write (byte[] array, int offset, int count) { if (array == null) throw new ArgumentNullException ("array"); CheckObjectDisposedException (); if (!m_stream.CanWrite) { throw new NotSupportedException ( Locale.GetText ("Cannot write to stream")); } if (offset < 0) throw new ArgumentOutOfRangeException ("offset", "< 0"); if (count < 0) throw new ArgumentOutOfRangeException ("count", "< 0"); // avoid possible integer overflow if (array.Length - offset < count) throw new ArgumentException ("array.Length - offset < count"); if (m_buffer_reading) { Flush(); m_buffer_reading = false; } // reordered to avoid possible integer overflow if (m_buffer_pos >= m_buffer.Length - count) { Flush (); m_stream.Write (array, offset, count); } else { Buffer.BlockCopyInternal (array, offset, m_buffer, m_buffer_pos, count); m_buffer_pos += count; } } private void CheckObjectDisposedException () { if (disposed) { throw new ObjectDisposedException ("BufferedStream", Locale.GetText ("Stream is closed")); } } } } Index: SecurityProtocolType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SecurityProtocolType.cs 15 Apr 2005 13:00:59 -0000 1.5 --- SecurityProtocolType.cs 23 Apr 2005 10:11:13 -0000 1.6 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: TlsClientSettings.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TlsClientSettings.cs 15 Apr 2005 13:00:59 -0000 1.5 --- TlsClientSettings.cs 23 Apr 2005 10:11:25 -0000 1.6 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: CipherAlgorithmType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/CipherAlgorithmType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CipherAlgorithmType.cs 15 Apr 2005 13:00:59 -0000 1.4 --- CipherAlgorithmType.cs 23 Apr 2005 10:11:12 -0000 1.5 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: TlsServerSettings.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/TlsServerSettings.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TlsServerSettings.cs 15 Apr 2005 13:00:59 -0000 1.5 --- TlsServerSettings.cs 23 Apr 2005 10:11:25 -0000 1.6 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: RSASslSignatureDeformatter.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureDeformatter.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RSASslSignatureDeformatter.cs 15 Apr 2005 13:00:59 -0000 1.4 --- RSASslSignatureDeformatter.cs 23 Apr 2005 10:11:13 -0000 1.5 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: Context.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/Context.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Context.cs 15 Apr 2005 13:00:59 -0000 1.14 --- Context.cs 23 Apr 2005 10:11:12 -0000 1.15 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: ServerContext.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/ServerContext.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ServerContext.cs 15 Apr 2005 13:00:59 -0000 1.6 --- ServerContext.cs 23 Apr 2005 10:11:13 -0000 1.7 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: HandshakeState.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/HandshakeState.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HandshakeState.cs 15 Apr 2005 13:00:59 -0000 1.3 --- HandshakeState.cs 23 Apr 2005 10:11:12 -0000 1.4 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: SslCipherSuite.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SslCipherSuite.cs 15 Apr 2005 13:00:59 -0000 1.9 --- SslCipherSuite.cs 23 Apr 2005 10:11:13 -0000 1.10 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // *************** *** 81,85 **** block.Write(this.Context.ServerWriteMAC); block.Write(this.pad1); - if (this.Context is ClientContext) { --- 81,84 ---- *************** *** 90,94 **** block.Write(this.Context.WriteSequenceNumber); } - block.Write((byte)contentType); block.Write((short)fragment.Length); --- 89,92 ---- *************** *** 119,123 **** block.Write(this.Context.ClientWriteMAC); block.Write(this.pad1); - if (this.Context is ClientContext) { --- 117,120 ---- *************** *** 128,132 **** block.Write(this.Context.ReadSequenceNumber); } - block.Write((byte)contentType); block.Write((short)fragment.Length); --- 125,128 ---- *************** *** 303,305 **** #endregion } ! } \ No newline at end of file --- 299,301 ---- #endregion } ! } --- NEW FILE: SslAsyncResult.cs --- using System; using System.Threading; namespace Mono.Security.Protocol.Tls { internal struct SslReadState { public byte[] recbuf; public byte[] buffer; public int offset; public int count; public AsyncCallback callback; public object state; } internal class SslAsyncResult : IAsyncResult { private IAsyncResult _network; // private byte[] _buffer; private AsyncCallback _callback; private object _state; // public SslAsyncResult (IAsyncResult network, byte[] buffer) public SslAsyncResult (object state) // public SslAsyncResult (IAsyncResult network, AsyncCallback callback, object state) { // _network = network; // _callback = callback; _state = state; } public object AsyncState { get { Console.WriteLine ("AsyncState\n{0}", Environment.StackTrace); return _state; } } public WaitHandle AsyncWaitHandle { get { Console.WriteLine ("AsyncWaitHandle\n{0}", Environment.StackTrace); return null; } } public bool CompletedSynchronously { get { Console.WriteLine ("CompletedSynchronously\n{0}", Environment.StackTrace); return false; } } public bool IsCompleted { get { Console.WriteLine ("IsCompleted\n{0}", Environment.StackTrace); return true; } } // public byte[] Buffer { // get { return _buffer; } // } public IAsyncResult NetworkAsyncResult { get { return _network; } } } } Index: ClientRecordProtocol.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ClientRecordProtocol.cs 15 Apr 2005 13:00:59 -0000 1.12 --- ClientRecordProtocol.cs 23 Apr 2005 10:11:12 -0000 1.13 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: TlsException.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TlsException.cs 15 Apr 2005 13:00:59 -0000 1.6 --- TlsException.cs 23 Apr 2005 10:11:25 -0000 1.7 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: SslServerStream.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SslServerStream.cs 15 Apr 2005 13:00:59 -0000 1.15 --- SslServerStream.cs 23 Apr 2005 10:11:25 -0000 1.16 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // *************** *** 403,407 **** // Read next record and write it into the inputBuffer long position = this.inputBuffer.Position; ! byte[] record = this.protocol.ReceiveRecord(); if (record != null && record.Length > 0) --- 403,407 ---- // Read next record and write it into the inputBuffer long position = this.inputBuffer.Position; ! byte[] record = this.protocol.ReceiveRecord(this.innerStream); if (record != null && record.Length > 0) *************** *** 651,655 **** // Receive Client Hello message ! this.protocol.ReceiveRecord(); // If received message is not an ClientHello send a --- 651,655 ---- // Receive Client Hello message ! this.protocol.ReceiveRecord (this.innerStream); // If received message is not an ClientHello send a *************** *** 687,691 **** while (this.context.LastHandshakeMsg != HandshakeType.Finished) { ! this.protocol.ReceiveRecord(); } --- 687,691 ---- while (this.context.LastHandshakeMsg != HandshakeType.Finished) { ! this.protocol.ReceiveRecord (this.innerStream); } Index: Alert.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/Alert.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Alert.cs 15 Apr 2005 13:00:58 -0000 1.6 --- Alert.cs 23 Apr 2005 10:11:12 -0000 1.7 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: ContentType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/ContentType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ContentType.cs 15 Apr 2005 13:00:59 -0000 1.5 --- ContentType.cs 23 Apr 2005 10:11:12 -0000 1.6 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // Index: ExchangeAlgorithmType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls/ExchangeAlgorithmType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ExchangeAlgorithmType.cs 15 Apr 2005 13:00:59 -0000 1.4 --- ExchangeAlgorithmType.cs 23 Apr 2005 10:11:12 -0000 1.5 *************** *** 1,4 **** // Transport Security Layer (TLS) ! // Copyright (c) 2003-2005 Carlos Guzman Alvarez // --- 1,4 ---- // Transport Security Layer (TLS) ! // Copyright (c) 2003-2004 Carlos Guzman Alvarez // |