[pgsqlclient-checkins] pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls.Handsha
Status: Inactive
Brought to you by:
carlosga_fb
From: Carlos Guzm?n ?l. <car...@us...> - 2004-04-21 12:59:28
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19220 Modified Files: TlsClientCertificateVerify.cs TlsClientFinished.cs TlsClientHello.cs TlsServerCertificateRequest.cs Log Message: 2004-04-22 Carlos Guzman Alvarez <car...@te...> * Mono.Security.Protocol.Tls/DebugHelper.cs: - New class. Index: TlsClientFinished.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientFinished.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TlsClientFinished.cs 10 Apr 2004 11:15:08 -0000 1.7 --- TlsClientFinished.cs 21 Apr 2004 12:58:11 -0000 1.8 *************** *** 80,86 **** if (decryptError) { ! throw new TlsException( ! AlertDescription.DecryptError, ! "Decrypt error."); } } --- 80,84 ---- if (decryptError) { ! throw new TlsException(AlertDescription.DecryptError, "Decrypt error."); } } *************** *** 118,124 **** if (decryptError) { ! throw new TlsException( ! AlertDescription.DecryptError, ! "Decrypt error."); } } --- 116,120 ---- if (decryptError) { ! throw new TlsException(AlertDescription.DecryptError, "Decrypt error."); } } Index: TlsClientCertificateVerify.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificateVerify.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TlsClientCertificateVerify.cs 10 Apr 2004 11:15:08 -0000 1.6 --- TlsClientCertificateVerify.cs 21 Apr 2004 12:58:10 -0000 1.7 *************** *** 56,66 **** (int)context.HandshakeMessages.Length); ! if (!hash.VerifySignature( ! context.ClientSettings.CertificateRSA, ! signature)) { ! throw new TlsException( ! AlertDescription.HandshakeFailiure, ! "Handshake Failiure."); } } --- 56,62 ---- (int)context.HandshakeMessages.Length); ! if (!hash.VerifySignature(context.ClientSettings.CertificateRSA, signature)) { ! throw new TlsException(AlertDescription.HandshakeFailiure, "Handshake Failiure."); } } *************** *** 78,84 **** (int)context.HandshakeMessages.Length); ! if (!hash.VerifySignature( ! context.ClientSettings.CertificateRSA, ! signature)) { throw new TlsException( --- 74,78 ---- (int)context.HandshakeMessages.Length); ! if (!hash.VerifySignature(context.ClientSettings.CertificateRSA, signature)) { throw new TlsException( Index: TlsServerCertificateRequest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificateRequest.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TlsServerCertificateRequest.cs 10 Apr 2004 11:15:08 -0000 1.5 --- TlsServerCertificateRequest.cs 21 Apr 2004 12:58:12 -0000 1.6 *************** *** 44,53 **** protected override void ProcessAsSsl3() { ! throw new NotSupportedException(); } protected override void ProcessAsTls1() { ! throw new NotSupportedException(); } --- 44,82 ---- protected override void ProcessAsSsl3() { ! this.ProcessAsTls1(); } protected override void ProcessAsTls1() { ! ServerContext context = (ServerContext)this.Context; ! ! int count = context.ServerSettings.CertificateTypes.Length; ! ! this.WriteByte(Convert.ToByte(count)); ! ! // Write requested certificate types ! for (int i = 0; i < count; i++) ! { ! this.WriteByte((byte)context.ServerSettings.CertificateTypes[i]); ! } ! ! /* ! * Write requested certificate authorities (Distinguised Names) ! * ! * Name ::= SEQUENCE OF RelativeDistinguishedName ! * ! * RelativeDistinguishedName ::= SET OF AttributeValueAssertion ! * ! * AttributeValueAssertion ::= SEQUENCE { ! * attributeType OBJECT IDENTIFIER ! * attributeValue ANY } ! */ ! ! this.Write(Convert.ToInt16(context.ServerSettings.DistinguisedNames.Length)); ! ! for (int i = 0; i < context.ServerSettings.DistinguisedNames.Length; i++) ! { ! #warning "Write certificate authorities list" ! } } Index: TlsClientHello.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientHello.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TlsClientHello.cs 10 Apr 2004 11:15:08 -0000 1.9 --- TlsClientHello.cs 21 Apr 2004 12:58:12 -0000 1.10 *************** *** 119,125 **** else { ! throw new TlsException( ! AlertDescription.ProtocolVersion, ! "Incorrect protocol version received from server"); } } --- 119,123 ---- else { ! throw new TlsException(AlertDescription.ProtocolVersion, "Incorrect protocol version received from server"); } } *************** *** 140,146 **** if (this.Context.Cipher == null) { ! throw new TlsException( ! AlertDescription.InsuficientSecurity, ! "Insuficient Security"); } } --- 138,142 ---- if (this.Context.Cipher == null) { ! throw new TlsException(AlertDescription.InsuficientSecurity, "Insuficient Security"); } } |