[pgsqlclient-checkins] pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Sec
Status: Inactive
Brought to you by:
carlosga_fb
|
From: <car...@us...> - 2003-10-13 19:15:18
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client
In directory sc8-pr-cvs1:/tmp/cvs-serv15018
Modified Files:
TlsServerCertificate.cs TlsServerCertificateRequest.cs
TlsServerFinished.cs TlsServerHello.cs TlsServerHelloDone.cs
TlsServerKeyExchange.cs
Log Message:
Added some improvements to the Handshake layer
Index: TlsServerCertificate.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerCertificate.cs 11 Oct 2003 10:09:37 -0000 1.1
--- TlsServerCertificate.cs 13 Oct 2003 19:15:13 -0000 1.2
***************
*** 72,82 ****
{
this.certificates = new X509CertificateCollection();
!
! // Skip first 3 bytes
! int skip = Reader.ReadInt24();
int readed = 0;
!
! // Read Length
! int length = Reader.ReadInt24();
while (readed < length)
--- 72,78 ----
{
this.certificates = new X509CertificateCollection();
!
int readed = 0;
! int length = Reader.ReadInt24();
while (readed < length)
Index: TlsServerCertificateRequest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificateRequest.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerCertificateRequest.cs 11 Oct 2003 10:09:37 -0000 1.1
--- TlsServerCertificateRequest.cs 13 Oct 2003 19:15:13 -0000 1.2
***************
*** 64,69 ****
protected override void Parse()
{
- int length = Reader.ReadInt24();
-
// Read requested certificate types
int typesCount = Reader.ReadByte();
--- 64,67 ----
***************
*** 76,91 ****
}
- // Read requested certificate authorities (Distinguised Names)
-
/*
! Name ::= SEQUENCE OF RelativeDistinguishedName
!
! RelativeDistinguishedName ::= SET OF AttributeValueAssertion
!
! AttributeValueAssertion ::= SEQUENCE {
! attributeType OBJECT IDENTIFIER
! attributeValue ANY }
! */
!
int tmp = Reader.ReadShort();
ASN1 rdn = new ASN1(Reader.ReadBytes(Reader.ReadShort()));
--- 74,88 ----
}
/*
! * Read requested certificate authorities (Distinguised Names)
! *
! * Name ::= SEQUENCE OF RelativeDistinguishedName
! *
! * RelativeDistinguishedName ::= SET OF AttributeValueAssertion
! *
! * AttributeValueAssertion ::= SEQUENCE {
! * attributeType OBJECT IDENTIFIER
! * attributeValue ANY }
! */
int tmp = Reader.ReadShort();
ASN1 rdn = new ASN1(Reader.ReadBytes(Reader.ReadShort()));
Index: TlsServerFinished.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerFinished.cs 11 Oct 2003 10:09:37 -0000 1.1
--- TlsServerFinished.cs 13 Oct 2003 19:15:13 -0000 1.2
***************
*** 50,61 ****
#endregion
! #region PRIVATE_METHOD
protected override void Parse()
{
! int length = Reader.ReadInt24();
! byte[] serverPRF = Reader.ReadBytes(length);
!
! TlsStreamWriter hashes = new TlsStreamWriter();
hashes.Write(Session.Context.HandshakeHashes.GetMD5Hash());
--- 50,59 ----
#endregion
! #region PROTECTED_METHODS
protected override void Parse()
{
! byte[] serverPRF = Reader.ReadBytes((int)Reader.Length);
! TlsStreamWriter hashes = new TlsStreamWriter();
hashes.Write(Session.Context.HandshakeHashes.GetMD5Hash());
Index: TlsServerHello.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHello.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerHello.cs 11 Oct 2003 10:09:37 -0000 1.1
--- TlsServerHello.cs 13 Oct 2003 19:15:13 -0000 1.2
***************
*** 68,74 ****
protected override void Parse()
{
- // Read message length
- this.length = Reader.ReadInt24();
-
// Read protocol version
this.protocol = (TlsProtocol)Reader.ReadShort();
--- 68,71 ----
Index: TlsServerHelloDone.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHelloDone.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerHelloDone.cs 11 Oct 2003 10:09:37 -0000 1.1
--- TlsServerHelloDone.cs 13 Oct 2003 19:15:13 -0000 1.2
***************
*** 53,57 ****
protected override void Parse()
{
- int length = Reader.ReadInt24();
}
--- 53,56 ----
Index: TlsServerKeyExchange.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls.Handshake/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsServerKeyExchange.cs 11 Oct 2003 10:09:37 -0000 1.1
--- TlsServerKeyExchange.cs 13 Oct 2003 19:15:13 -0000 1.2
***************
*** 65,74 ****
protected override void Parse()
{
- int length = Reader.ReadInt24();
-
rsaParams = new RSAParameters();
// Read modulus
! length = Reader.ReadShort();
rsaParams.Modulus = Reader.ReadBytes(length);
--- 65,72 ----
protected override void Parse()
{
rsaParams = new RSAParameters();
// Read modulus
! int length = Reader.ReadShort();
rsaParams.Modulus = Reader.ReadBytes(length);
|