Update of /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake
In directory sc8-pr-cvs1:/tmp/cvs-serv5815
Modified Files:
TlsClientCertificate.cs TlsServerCertificateRequest.cs
Log Message:
Added changes to the client authentication stuff
Index: TlsClientCertificate.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsClientCertificate.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TlsClientCertificate.cs 8 Oct 2003 12:20:08 -0000 1.1
--- TlsClientCertificate.cs 8 Oct 2003 21:57:52 -0000 1.2
***************
*** 18,21 ****
--- 18,22 ----
using System;
+ using System.Security.Tls;
using System.Security.Cryptography.X509Certificates;
***************
*** 47,51 ****
protected override void Fill()
{
! #warning "Process message here"
}
--- 48,64 ----
protected override void Fill()
{
! #warning "Check which type of certificates has been requested by the server"
!
! // Write client certificates information to a stream
! TlsStreamWriter stream = new TlsStreamWriter();
! foreach (X509Certificate cert in Session.Settings.Certificates)
! {
! stream.WriteInt24(cert.GetRawCertData().Length);
! stream.Write(cert.GetRawCertData());
! }
!
! // Compose the message
! this.WriteInt24((int)stream.Length);
! this.Write(stream.GetBytes());
}
Index: TlsServerCertificateRequest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PgSqlClient.Security.Tls/source/Handshake/TlsServerCertificateRequest.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TlsServerCertificateRequest.cs 8 Oct 2003 18:23:18 -0000 1.6
--- TlsServerCertificateRequest.cs 8 Oct 2003 21:57:52 -0000 1.7
***************
*** 47,51 ****
base.UpdateSession();
! Session.Context.ServerSettings.CertificateRequest = true;
}
--- 47,53 ----
base.UpdateSession();
! Session.Context.ServerSettings.CertificateTypes = this.certificateTypes;
! Session.Context.ServerSettings.DistinguisedNames = this.distinguisedNames;
! Session.Context.ServerSettings.CertificateRequest = true;
}
***************
*** 85,88 ****
--- 87,91 ----
distinguisedNames = new string[rdn.Count];
+ #warning "needs testing"
for (int i = 0; i < rdn.Count; i++)
{
|