[Fedora-directory-commits] windowsautoenroll/panel AssemblyInfo.cs, NONE, 1.1 ProxyPanel.cs, 1.2, 1.3 ProxyPanel.resx, NONE, 1.1 WinCapi.cs, NONE, 1.1 cert.ico, NONE, 1.1 panel.csproj, NONE, 1.1 panel.csproj.user, NONE, 1.1

Steven W Parkinson (sparkins) fedora-directory-commits at redhat.com
Tue Mar 13 01:36:12 UTC 2007


Author: sparkins

Update of /cvs/dirsec/windowsautoenroll/panel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24806/panel

Added Files:
	AssemblyInfo.cs ProxyPanel.cs ProxyPanel.resx WinCapi.cs 
	cert.ico panel.csproj panel.csproj.user 
Log Message:
0.9.1: new since last release:
running as a service, CA failover, support for ICertRequestD2 (IFDEFed),
using C++ strings instead of char[], support for additional domain controllers
in a forest, decoding PKCS#10 request to find Cert template name, installer,
new base 64 decoder, profile mapper



--- NEW FILE AssemblyInfo.cs ---
using System.Reflection;
using System.Runtime.CompilerServices;

//
// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("Certificate System Auto Enrollment Proxy")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Red Hat")]
[assembly: AssemblyProduct("Auto Enrollment Proxy")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]		

//
// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.*")]

//
// In order to sign your assembly you must specify a key to use. Refer to the 
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing. 
//
// Notes: 
//   (*) If no key is specified, the assembly is not signed.
//   (*) KeyName refers to a key that has been installed in the Crypto Service
//       Provider (CSP) on your machine. KeyFile refers to a file which contains
//       a key.
//   (*) If the KeyFile and the KeyName values are both specified, the 
//       following processing occurs:
//       (1) If the KeyName can be found in the CSP, that key is used.
//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
//           in the KeyFile is installed into the CSP and used.
//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
//       When specifying the KeyFile, the location of the KeyFile should be
//       relative to the project output directory which is
//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
//       located in the project directory, you would specify the AssemblyKeyFile 
//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
//       documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]


Index: ProxyPanel.cs
===================================================================
RCS file: ProxyPanel.cs
diff -N ProxyPanel.cs
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ProxyPanel.cs	13 Mar 2007 01:36:10 -0000	1.3
@@ -0,0 +1,1369 @@
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.IO;
+using System.Data;
+using System.DirectoryServices;
+using System.Net;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using Microsoft.Win32;
+using System.Diagnostics;
+//using ActiveDs;
+
+
+
+
+namespace ProxyPanel
+{
+	/// <summary>
+	/// Summary description for ProxyPanel.
+	/// </summary>
+	
+	public class ProxyPanel : System.Windows.Forms.Form
+	{
+		private System.Windows.Forms.TabPage caconfig;
+		private System.Windows.Forms.TabPage debug;
+		private System.Windows.Forms.TextBox hosttextbox;
+		private System.Windows.Forms.TextBox porttextbox;
+		private System.Windows.Forms.GroupBox groupBox1;
+		private System.Windows.Forms.GroupBox groupBox2;
+		private System.Windows.Forms.GroupBox groupBox3;
+		private System.Windows.Forms.RadioButton pkcs10;
+		private System.Windows.Forms.RadioButton cmc;
+		private System.Windows.Forms.GroupBox groupBox4;
+		private System.Windows.Forms.Button apply;
+		private System.Windows.Forms.Button cancel;
+		private System.Windows.Forms.Button help;
+		private System.Windows.Forms.Button populateLDAP;
+		private System.Windows.Forms.TabControl caCertificateTab;
+		private System.Windows.Forms.TabPage caCertificatePanel;
+		private System.Windows.Forms.TextBox certtextbox;
+
+		private System.Windows.Forms.Label label1;
+		private System.Windows.Forms.Label label2;
+		private System.Windows.Forms.Label label4;
+
+		private byte[] cacertificate_bin = null;
+		private byte[] config_clientCertificate = null;
+		private bool config_calistchanged = false;
+		private bool config_cacertificate = false;
+
+		private CertIdentifier[] cids = null;
+		private System.Windows.Forms.ComboBox clientCertSelection;
+		private System.Windows.Forms.Button removeca;
+		private System.Windows.Forms.Button addca;
+		private System.Windows.Forms.ListView calist;
+		private System.Windows.Forms.ColumnHeader Host;
+		private System.Windows.Forms.ColumnHeader Port;
+		private System.Windows.Forms.TabPage adpanel;
+		private System.Windows.Forms.TabPage about;
+		private System.Windows.Forms.TextBox caname;
+		private System.Windows.Forms.Button setcacert;
+		private System.Windows.Forms.Label label3;
+		private System.Windows.Forms.Label label6;
+		private System.Windows.Forms.Label label7;
+
+		private string begincertificate_str = "-----BEGIN CERTIFICATE-----";
+		private string endcertificate_str   = "-----END CERTIFICATE-----";
+		private System.Windows.Forms.TextBox dslog;
+		private System.Windows.Forms.Label label8;
+		private System.Windows.Forms.CheckBox overwrite;
+		private System.Windows.Forms.Label label10;
+		private System.Windows.Forms.Label label9;
+		private System.Windows.Forms.Label label11;
+		private System.Windows.Forms.Button launchEventViewer;
+		private System.Windows.Forms.CheckBox log_d_detail;
+		private System.Windows.Forms.CheckBox log_d_func;
+		private System.Windows.Forms.CheckBox log_d_ca;
+		private System.Windows.Forms.CheckBox log_d_config;
+		private System.Windows.Forms.CheckBox log_d_com;
+		private System.Windows.Forms.CheckBox log_cert;
+		private System.Windows.Forms.CheckBox log_req;
+		private System.Windows.Forms.OpenFileDialog openFileDialog1;
+		private System.Windows.Forms.Label label12;
+		private System.Windows.Forms.Button load;
+		private System.Windows.Forms.Label label5;
+		private System.Windows.Forms.ComboBox catypecombobox;
+		private System.Windows.Forms.ColumnHeader CAType;
+		private System.Windows.Forms.CheckBox log_misc;
+		private System.Windows.Forms.LinkLabel linkLabel1;
+		
+		/// <summary>
+		/// Required designer variable.
+		/// </summary>
+		private System.ComponentModel.Container components = null;
+
+		public ProxyPanel()
+		{
+			//
+			// Required for Windows Form Designer support
+			//
+			
+
+			InitializeComponent();
+			try 
+			{
+				initializeClientCertUI();
+
+				getCAListRegistry();
+				getCACertRegistry();
+				getLogOptionsRegistry();
+			} 
+			catch (Exception e) 
+			{
+				MessageBox.Show("Error in initialization.  Continue? "
+					+ e.StackTrace, "Alert", MessageBoxButtons.OKCancel);
+			}
+
+		}
+
+		private void initializeClientCertUI()
+		{
+			populateClientCertificates();
+
+			// Add list of client certs to drop-down
+			addCertsToComboBox();
+
+			// Read current cert selection from registry and
+			// figure out which one to select in the drop-down
+			getClientCertRegistryConfig();
+		}
+
+		private void populateClientCertificates()
+		{
+			WinCapi wc = new WinCapi();
+			cids = wc.getMyCertNames();
+
+		}
+
+		/// <summary>
+		/// Clean up any resources being used.
+		/// </summary>
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if (components != null) 
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+
+		#region Windows Form Designer generated code
+		/// <summary>
+		/// Required method for Designer support - do not modify
+		/// the contents of this method with the code editor.
+		/// </summary>
+		private void InitializeComponent()
+		{
+			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ProxyPanel));
+			this.caCertificateTab = new System.Windows.Forms.TabControl();
+			this.about = new System.Windows.Forms.TabPage();
+			this.linkLabel1 = new System.Windows.Forms.LinkLabel();
+			this.label7 = new System.Windows.Forms.Label();
+			this.label6 = new System.Windows.Forms.Label();
+			this.label3 = new System.Windows.Forms.Label();
+			this.caCertificatePanel = new System.Windows.Forms.TabPage();
+			this.load = new System.Windows.Forms.Button();
+			this.label12 = new System.Windows.Forms.Label();
+			this.setcacert = new System.Windows.Forms.Button();
+			this.caname = new System.Windows.Forms.TextBox();
+			this.certtextbox = new System.Windows.Forms.TextBox();
+			this.adpanel = new System.Windows.Forms.TabPage();
+			this.groupBox4 = new System.Windows.Forms.GroupBox();
+			this.overwrite = new System.Windows.Forms.CheckBox();
+			this.label8 = new System.Windows.Forms.Label();
+			this.dslog = new System.Windows.Forms.TextBox();
+			this.label4 = new System.Windows.Forms.Label();
+			this.populateLDAP = new System.Windows.Forms.Button();
+			this.caconfig = new System.Windows.Forms.TabPage();
+			this.label5 = new System.Windows.Forms.Label();
+			this.groupBox3 = new System.Windows.Forms.GroupBox();
+			this.cmc = new System.Windows.Forms.RadioButton();
+			this.pkcs10 = new System.Windows.Forms.RadioButton();
+			this.groupBox2 = new System.Windows.Forms.GroupBox();
+			this.clientCertSelection = new System.Windows.Forms.ComboBox();
+			this.label2 = new System.Windows.Forms.Label();
+			this.porttextbox = new System.Windows.Forms.TextBox();
+			this.label1 = new System.Windows.Forms.Label();
+			this.hosttextbox = new System.Windows.Forms.TextBox();
+			this.removeca = new System.Windows.Forms.Button();
+			this.addca = new System.Windows.Forms.Button();
+			this.calist = new System.Windows.Forms.ListView();
+			this.Host = new System.Windows.Forms.ColumnHeader();
+			this.Port = new System.Windows.Forms.ColumnHeader();
+			this.CAType = new System.Windows.Forms.ColumnHeader();
+			this.groupBox1 = new System.Windows.Forms.GroupBox();
+			this.catypecombobox = new System.Windows.Forms.ComboBox();
+			this.debug = new System.Windows.Forms.TabPage();
+			this.log_misc = new System.Windows.Forms.CheckBox();
+			this.log_d_detail = new System.Windows.Forms.CheckBox();
+			this.log_d_func = new System.Windows.Forms.CheckBox();
+			this.log_d_ca = new System.Windows.Forms.CheckBox();
+			this.log_d_config = new System.Windows.Forms.CheckBox();
+			this.log_d_com = new System.Windows.Forms.CheckBox();
+			this.launchEventViewer = new System.Windows.Forms.Button();
+			this.label11 = new System.Windows.Forms.Label();
+			this.label10 = new System.Windows.Forms.Label();
+			this.log_cert = new System.Windows.Forms.CheckBox();
+			this.log_req = new System.Windows.Forms.CheckBox();
+			this.label9 = new System.Windows.Forms.Label();
+			this.apply = new System.Windows.Forms.Button();
+			this.cancel = new System.Windows.Forms.Button();
+			this.help = new System.Windows.Forms.Button();
+			this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+			this.caCertificateTab.SuspendLayout();
+			this.about.SuspendLayout();
+			this.caCertificatePanel.SuspendLayout();
+			this.adpanel.SuspendLayout();
+			this.groupBox4.SuspendLayout();
+			this.caconfig.SuspendLayout();
+			this.groupBox3.SuspendLayout();
+			this.groupBox2.SuspendLayout();
+			this.groupBox1.SuspendLayout();
+			this.debug.SuspendLayout();
+			this.SuspendLayout();
+			// 
+			// caCertificateTab
+			// 
+			this.caCertificateTab.Controls.Add(this.about);
+			this.caCertificateTab.Controls.Add(this.caCertificatePanel);
+			this.caCertificateTab.Controls.Add(this.adpanel);
+			this.caCertificateTab.Controls.Add(this.caconfig);
+			this.caCertificateTab.Controls.Add(this.debug);
+			this.caCertificateTab.Dock = System.Windows.Forms.DockStyle.Fill;
+			this.caCertificateTab.Location = new System.Drawing.Point(0, 0);
+			this.caCertificateTab.Name = "caCertificateTab";
+			this.caCertificateTab.SelectedIndex = 0;
+			this.caCertificateTab.Size = new System.Drawing.Size(488, 421);
+			this.caCertificateTab.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight;
+			this.caCertificateTab.TabIndex = 0;
+			// 
+			// about
+			// 
+			this.about.Controls.Add(this.linkLabel1);
+			this.about.Controls.Add(this.label7);
+			this.about.Controls.Add(this.label6);
+			this.about.Controls.Add(this.label3);
+			this.about.Location = new System.Drawing.Point(4, 22);
+			this.about.Name = "about";
+			this.about.Size = new System.Drawing.Size(480, 395);
+			this.about.TabIndex = 6;
+			this.about.Text = "About";
+			// 
+			// linkLabel1
+			// 
+			this.linkLabel1.Location = new System.Drawing.Point(24, 96);
+			this.linkLabel1.Name = "linkLabel1";
+			this.linkLabel1.Size = new System.Drawing.Size(312, 23);
+			this.linkLabel1.TabIndex = 5;
+			this.linkLabel1.TabStop = true;
+			this.linkLabel1.Text = "http://directory.fedora.redhat.com/wiki/aep";
+			// 
+			// label7
+			// 
+			this.label7.Location = new System.Drawing.Point(24, 72);
+			this.label7.Name = "label7";
+			this.label7.Size = new System.Drawing.Size(320, 23);
+			this.label7.TabIndex = 3;
+			this.label7.Text = "Version 0.9.1, March 8 , 2007";
+			this.label7.Click += new System.EventHandler(this.label7_Click);
+			// 
+			// label6
+			// 
+			this.label6.Location = new System.Drawing.Point(24, 48);
+			this.label6.Name = "label6";
+			this.label6.Size = new System.Drawing.Size(320, 23);
+			this.label6.TabIndex = 2;
+			this.label6.Text = "Auto Enrollment Proxy Control Panel";
+			// 
+			// label3
+			// 
+			this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+			this.label3.Location = new System.Drawing.Point(16, 16);
+			this.label3.Name = "label3";
+			this.label3.Size = new System.Drawing.Size(328, 24);
+			this.label3.TabIndex = 0;
+			this.label3.Text = "Auto Enrollment Proxy";
+			// 
+			// caCertificatePanel
+			// 
+			this.caCertificatePanel.Controls.Add(this.load);
+			this.caCertificatePanel.Controls.Add(this.label12);
+			this.caCertificatePanel.Controls.Add(this.setcacert);
+			this.caCertificatePanel.Controls.Add(this.caname);
+			this.caCertificatePanel.Controls.Add(this.certtextbox);
+			this.caCertificatePanel.Location = new System.Drawing.Point(4, 22);
+			this.caCertificatePanel.Name = "caCertificatePanel";
+			this.caCertificatePanel.Size = new System.Drawing.Size(480, 395);
+			this.caCertificatePanel.TabIndex = 5;
+			this.caCertificatePanel.Text = "CA Certificate";
+			// 
+			// load
+			// 
+			this.load.Location = new System.Drawing.Point(16, 24);
+			this.load.Name = "load";
+			this.load.Size = new System.Drawing.Size(96, 23);
+			this.load.TabIndex = 5;
+			this.load.Text = "Load From File";
+			this.load.Click += new System.EventHandler(this.load_Click);
+			// 
+			// label12
+			// 
+			this.label12.Location = new System.Drawing.Point(16, 320);
+			this.label12.Name = "label12";
+			this.label12.Size = new System.Drawing.Size(72, 23);
+			this.label12.TabIndex = 4;
+			this.label12.Text = "CA Name";
+			// 
+			// setcacert
+			// 
+			this.setcacert.Location = new System.Drawing.Point(16, 280);
+			this.setcacert.Name = "setcacert";
+			this.setcacert.Size = new System.Drawing.Size(96, 23);
+			this.setcacert.TabIndex = 3;
+			this.setcacert.Text = "Set";
+			this.setcacert.Click += new System.EventHandler(this.setcacert_Click);
+			// 
+			// caname
+			// 
+			this.caname.Location = new System.Drawing.Point(96, 320);
+			this.caname.Name = "caname";
+			this.caname.ReadOnly = true;
+			this.caname.Size = new System.Drawing.Size(352, 20);
+			this.caname.TabIndex = 1;
+			this.caname.Text = "";
+			// 
+			// certtextbox
+			// 
+			this.certtextbox.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+			this.certtextbox.Location = new System.Drawing.Point(16, 64);
+			this.certtextbox.Multiline = true;
+			this.certtextbox.Name = "certtextbox";
+			this.certtextbox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+			this.certtextbox.Size = new System.Drawing.Size(432, 208);
+			this.certtextbox.TabIndex = 0;
+			this.certtextbox.Text = "";
+			// 
+			// adpanel
+			// 
+			this.adpanel.AutoScroll = true;
+			this.adpanel.Controls.Add(this.groupBox4);
+			this.adpanel.Location = new System.Drawing.Point(4, 22);
+			this.adpanel.Name = "adpanel";
+			this.adpanel.Size = new System.Drawing.Size(480, 395);
+			this.adpanel.TabIndex = 0;
+			this.adpanel.Text = "Active Directory";
+			// 
+			// groupBox4
+			// 
+			this.groupBox4.Controls.Add(this.overwrite);
+			this.groupBox4.Controls.Add(this.label8);
+			this.groupBox4.Controls.Add(this.dslog);
+			this.groupBox4.Controls.Add(this.label4);
+			this.groupBox4.Controls.Add(this.populateLDAP);
+			this.groupBox4.Location = new System.Drawing.Point(8, 8);
+			this.groupBox4.Name = "groupBox4";
+			this.groupBox4.Size = new System.Drawing.Size(448, 304);
+			this.groupBox4.TabIndex = 0;
+			this.groupBox4.TabStop = false;
+			this.groupBox4.Text = "Active Directory Setup";
+			// 
+			// overwrite
+			// 
+			this.overwrite.Location = new System.Drawing.Point(168, 64);
+			this.overwrite.Name = "overwrite";
+			this.overwrite.Size = new System.Drawing.Size(160, 24);
+			this.overwrite.TabIndex = 4;
+			this.overwrite.Text = "Overwrite existing settings";
+			// 
+			// label8
+			// 
+			this.label8.Location = new System.Drawing.Point(40, 104);
+			this.label8.Name = "label8";
+			this.label8.Size = new System.Drawing.Size(100, 16);
+			this.label8.TabIndex = 3;
+			this.label8.Text = "Log:";
+			// 
+			// dslog
+			// 
+			this.dslog.Location = new System.Drawing.Point(32, 120);
+			this.dslog.Multiline = true;
+			this.dslog.Name = "dslog";
+			this.dslog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+			this.dslog.Size = new System.Drawing.Size(384, 152);
+			this.dslog.TabIndex = 2;
+			this.dslog.Text = "";
+			// 
+			// label4
+			// 
+			this.label4.Location = new System.Drawing.Point(168, 40);
+			this.label4.Name = "label4";
+			this.label4.Size = new System.Drawing.Size(248, 23);
+			this.label4.TabIndex = 1;
+			this.label4.Text = "Populate AD with CA service settings";
+			// 
+			// populateLDAP
+			// 
+			this.populateLDAP.CausesValidation = false;
+			this.populateLDAP.Enabled = false;
+			this.populateLDAP.Location = new System.Drawing.Point(32, 40);
+			this.populateLDAP.Name = "populateLDAP";
+			this.populateLDAP.Size = new System.Drawing.Size(112, 23);
+			this.populateLDAP.TabIndex = 0;
+			this.populateLDAP.Text = "Populate AD";
+			this.populateLDAP.Click += new System.EventHandler(this.populateLDAP_Click);
+			// 
+			// caconfig
+			// 
+			this.caconfig.Controls.Add(this.label5);
+			this.caconfig.Controls.Add(this.groupBox3);
+			this.caconfig.Controls.Add(this.groupBox2);
+			this.caconfig.Controls.Add(this.label2);
+			this.caconfig.Controls.Add(this.porttextbox);
+			this.caconfig.Controls.Add(this.label1);
+			this.caconfig.Controls.Add(this.hosttextbox);
+			this.caconfig.Controls.Add(this.removeca);
+			this.caconfig.Controls.Add(this.addca);
+			this.caconfig.Controls.Add(this.calist);
+			this.caconfig.Controls.Add(this.groupBox1);
+			this.caconfig.Location = new System.Drawing.Point(4, 22);
+			this.caconfig.Name = "caconfig";
+			this.caconfig.Size = new System.Drawing.Size(480, 395);
+			this.caconfig.TabIndex = 1;
+			this.caconfig.Text = "CA Connection";
+			// 
+			// label5
+			// 
+			this.label5.Location = new System.Drawing.Point(256, 88);
+			this.label5.Name = "label5";
+			this.label5.Size = new System.Drawing.Size(56, 16);
+			this.label5.TabIndex = 10;
+			this.label5.Text = "CA Type:";
+			// 
+			// groupBox3
+			// 
+			this.groupBox3.Controls.Add(this.cmc);
+			this.groupBox3.Controls.Add(this.pkcs10);
+			this.groupBox3.Location = new System.Drawing.Point(8, 240);
+			this.groupBox3.Name = "groupBox3";
+			this.groupBox3.Size = new System.Drawing.Size(448, 88);
+			this.groupBox3.TabIndex = 9;
+			this.groupBox3.TabStop = false;
+			this.groupBox3.Text = "Request Submission";
+			this.groupBox3.Visible = false;
+			// 
+			// cmc
+			// 
+			this.cmc.Enabled = false;
+			this.cmc.Location = new System.Drawing.Point(32, 48);
+			this.cmc.Name = "cmc";
+			this.cmc.Size = new System.Drawing.Size(336, 24);
+			this.cmc.TabIndex = 7;
+			this.cmc.Text = "Encapsulate PKCS#10 request in signed CMC request";
+			this.cmc.Visible = false;
+			// 
+			// pkcs10
+			// 
+			this.pkcs10.Checked = true;
+			this.pkcs10.Location = new System.Drawing.Point(32, 24);
+			this.pkcs10.Name = "pkcs10";
+			this.pkcs10.Size = new System.Drawing.Size(344, 24);
+			this.pkcs10.TabIndex = 6;
+			this.pkcs10.TabStop = true;
+			this.pkcs10.Text = "Forward original PKCS#10 request over SSL w/Client Auth";
+			this.pkcs10.Visible = false;
+			// 
+			// groupBox2
+			// 
+			this.groupBox2.Controls.Add(this.clientCertSelection);
+			this.groupBox2.Location = new System.Drawing.Point(8, 160);
+			this.groupBox2.Name = "groupBox2";
+			this.groupBox2.Size = new System.Drawing.Size(448, 64);
+			this.groupBox2.TabIndex = 8;
+			this.groupBox2.TabStop = false;
+			this.groupBox2.Text = "Authentication to CA - Choose SSL Client Certificate";
+			// 
+			// clientCertSelection
+			// 
+			this.clientCertSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+			this.clientCertSelection.Location = new System.Drawing.Point(16, 24);
+			this.clientCertSelection.Name = "clientCertSelection";
+			this.clientCertSelection.Size = new System.Drawing.Size(416, 21);
+			this.clientCertSelection.TabIndex = 1;
+			this.clientCertSelection.SelectionChangeCommitted += new System.EventHandler(this.change_Certificate);
+			// 
+			// label2
+			// 
+			this.label2.Location = new System.Drawing.Point(256, 64);
+			this.label2.Name = "label2";
+			this.label2.Size = new System.Drawing.Size(32, 16);
+			this.label2.TabIndex = 0;
+			this.label2.Text = "Port:";
+			// 
+			// porttextbox
+			// 
+			this.porttextbox.Location = new System.Drawing.Point(320, 64);
+			this.porttextbox.Name = "porttextbox";
+			this.porttextbox.Size = new System.Drawing.Size(64, 20);
+			this.porttextbox.TabIndex = 2;
+			this.porttextbox.Text = "";
+			// 
+			// label1
+			// 
+			this.label1.Location = new System.Drawing.Point(256, 40);
+			this.label1.Name = "label1";
+			this.label1.Size = new System.Drawing.Size(32, 16);
+			this.label1.TabIndex = 0;
+			this.label1.Text = "Host:";
+			// 
+			// hosttextbox
+			// 
+			this.hosttextbox.Location = new System.Drawing.Point(320, 40);
+			this.hosttextbox.Name = "hosttextbox";
+			this.hosttextbox.Size = new System.Drawing.Size(120, 20);
+			this.hosttextbox.TabIndex = 1;
+			this.hosttextbox.Text = "";
+			// 
+			// removeca
+			// 
+			this.removeca.Location = new System.Drawing.Point(368, 120);
+			this.removeca.Name = "removeca";
+			this.removeca.TabIndex = 4;
+			this.removeca.Text = "Remove CA";
+			this.removeca.Click += new System.EventHandler(this.removeca_Click);
+			// 
+			// addca
+			// 
+			this.addca.Location = new System.Drawing.Point(272, 120);
+			this.addca.Name = "addca";
+			this.addca.TabIndex = 3;
+			this.addca.Text = "Add CA";
+			this.addca.Click += new System.EventHandler(this.addca_Click);
+			// 
+			// calist
+			// 
+			this.calist.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+																					 this.Host,
+																					 this.Port,
+																					 this.CAType});
+			this.calist.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
+			this.calist.Location = new System.Drawing.Point(16, 32);
+			this.calist.MultiSelect = false;
+			this.calist.Name = "calist";
+			this.calist.Size = new System.Drawing.Size(232, 112);
+			this.calist.TabIndex = 0;
+			this.calist.View = System.Windows.Forms.View.Details;
+			// 
+			// Host
+			// 
+			this.Host.Text = "Host";
+			this.Host.Width = 106;
+			// 
+			// Port
+			// 
+			this.Port.Text = "Port";
+			this.Port.Width = 37;
+			// 
+			// CAType
+			// 
+			this.CAType.Text = "CA Type";
+			// 
+			// groupBox1
+			// 
+			this.groupBox1.Controls.Add(this.catypecombobox);
+			this.groupBox1.Location = new System.Drawing.Point(8, 16);
+			this.groupBox1.Name = "groupBox1";
+			this.groupBox1.Size = new System.Drawing.Size(448, 136);
+			this.groupBox1.TabIndex = 7;
+			this.groupBox1.TabStop = false;
+			this.groupBox1.Text = "CA Connection Pool";
+			// 
+			// catypecombobox
+			// 
+			this.catypecombobox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+			this.catypecombobox.Items.AddRange(new object[] {
+																"Netscape CMS 6.1 or earlier",
+																"Red Hat CS 7.1",
+																"Red Hat CS 7.2"});
+			this.catypecombobox.Location = new System.Drawing.Point(312, 72);
+			this.catypecombobox.Name = "catypecombobox";
+			this.catypecombobox.Size = new System.Drawing.Size(121, 21);
+			this.catypecombobox.TabIndex = 0;
+			// 
+			// debug
+			// 
+			this.debug.Controls.Add(this.log_misc);
+			this.debug.Controls.Add(this.log_d_detail);
+			this.debug.Controls.Add(this.log_d_func);
+			this.debug.Controls.Add(this.log_d_ca);
+			this.debug.Controls.Add(this.log_d_config);
+			this.debug.Controls.Add(this.log_d_com);
+			this.debug.Controls.Add(this.launchEventViewer);
+			this.debug.Controls.Add(this.label11);
+			this.debug.Controls.Add(this.label10);
+			this.debug.Controls.Add(this.log_cert);
+			this.debug.Controls.Add(this.log_req);
+			this.debug.Controls.Add(this.label9);
+			this.debug.Location = new System.Drawing.Point(4, 22);
+			this.debug.Name = "debug";
+			this.debug.Size = new System.Drawing.Size(480, 395);
+			this.debug.TabIndex = 2;
+			this.debug.Text = "Logging";
+			// 
+			// log_misc
+			// 
+			this.log_misc.Location = new System.Drawing.Point(224, 48);
+			this.log_misc.Name = "log_misc";
+			this.log_misc.Size = new System.Drawing.Size(152, 24);
+			this.log_misc.TabIndex = 14;
+			this.log_misc.Text = "Miscellaneous";
+			// 
+			// log_d_detail
+			// 
+			this.log_d_detail.Location = new System.Drawing.Point(224, 192);
+			this.log_d_detail.Name = "log_d_detail";
+			this.log_d_detail.Size = new System.Drawing.Size(160, 24);
+			this.log_d_detail.TabIndex = 13;
+			this.log_d_detail.Text = "Extra detail";
+			// 
+			// log_d_func
+			// 
+			this.log_d_func.Location = new System.Drawing.Point(224, 160);
+			this.log_d_func.Name = "log_d_func";
+			this.log_d_func.Size = new System.Drawing.Size(160, 24);
+			this.log_d_func.TabIndex = 12;
+			this.log_d_func.Text = "Function call entry/exit";
+			// 
+			// log_d_ca
+			// 
+			this.log_d_ca.Location = new System.Drawing.Point(48, 224);
+			this.log_d_ca.Name = "log_d_ca";
+			this.log_d_ca.Size = new System.Drawing.Size(160, 24);
+			this.log_d_ca.TabIndex = 11;
+			this.log_d_ca.Text = "CA Communication";
+			// 
+			// log_d_config
+			// 
+			this.log_d_config.Location = new System.Drawing.Point(48, 192);
+			this.log_d_config.Name = "log_d_config";
+			this.log_d_config.Size = new System.Drawing.Size(160, 24);
+			this.log_d_config.TabIndex = 10;
+			this.log_d_config.Text = "Configuration / Registry";
+			// 
+			// log_d_com
+			// 
+			this.log_d_com.Location = new System.Drawing.Point(48, 160);
+			this.log_d_com.Name = "log_d_com";
+			this.log_d_com.Size = new System.Drawing.Size(160, 24);
+			this.log_d_com.TabIndex = 9;
+			this.log_d_com.Text = "COM / DCOM";
+			// 
+			// launchEventViewer
+			// 
+			this.launchEventViewer.Location = new System.Drawing.Point(304, 280);
+			this.launchEventViewer.Name = "launchEventViewer";
+			this.launchEventViewer.Size = new System.Drawing.Size(128, 23);
+			this.launchEventViewer.TabIndex = 8;
+			this.launchEventViewer.Text = "Launch Event Viewer";
+			this.launchEventViewer.Click += new System.EventHandler(this.launchEventViewer_Click);
+			// 
+			// label11
+			// 
+			this.label11.Location = new System.Drawing.Point(24, 280);
+			this.label11.Name = "label11";
+			this.label11.Size = new System.Drawing.Size(240, 23);
+			this.label11.TabIndex = 7;
+			this.label11.Text = "All logs are written to the \'application\' event log";
+			// 
+			// label10
+			// 
+			this.label10.Location = new System.Drawing.Point(16, 16);
+			this.label10.Name = "label10";
+			this.label10.Size = new System.Drawing.Size(240, 23);
+			this.label10.TabIndex = 6;
+			this.label10.Text = "Logging Events";
+			// 
+			// log_cert
+			// 
+			this.log_cert.Location = new System.Drawing.Point(48, 80);
+			this.log_cert.Name = "log_cert";
+			this.log_cert.Size = new System.Drawing.Size(152, 24);
+			this.log_cert.TabIndex = 5;
+			this.log_cert.Text = "Certificate Issuance";
+			// 
+			// log_req
+			// 
+			this.log_req.Location = new System.Drawing.Point(48, 48);
+			this.log_req.Name = "log_req";
+			this.log_req.Size = new System.Drawing.Size(152, 24);
+			this.log_req.TabIndex = 3;
+			this.log_req.Text = "Request Processing";
+			// 
+			// label9
+			// 
+			this.label9.Location = new System.Drawing.Point(24, 128);
+			this.label9.Name = "label9";
+			this.label9.Size = new System.Drawing.Size(240, 23);
+			this.label9.TabIndex = 4;
+			this.label9.Text = "Debug events";
+			// 
+			// apply
+			// 
+			this.apply.Location = new System.Drawing.Point(264, 384);
+			this.apply.Name = "apply";
+			this.apply.Size = new System.Drawing.Size(64, 24);
+			this.apply.TabIndex = 8;
+			this.apply.Text = "Apply";
+			this.apply.Click += new System.EventHandler(this.apply_Click);
+			// 
+			// cancel
+			// 
+			this.cancel.Location = new System.Drawing.Point(336, 384);
+			this.cancel.Name = "cancel";
+			this.cancel.Size = new System.Drawing.Size(64, 24);
+			this.cancel.TabIndex = 9;
+			this.cancel.Text = "Cancel";
+			this.cancel.Click += new System.EventHandler(this.cancel_Click);
+			// 
+			// help
+			// 
+			this.help.Enabled = false;
+			this.help.Location = new System.Drawing.Point(408, 384);
+			this.help.Name = "help";
+			this.help.Size = new System.Drawing.Size(64, 24);
+			this.help.TabIndex = 3;
+			this.help.Text = "Help";
+			// 
+			// ProxyPanel
+			// 
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.ClientSize = new System.Drawing.Size(488, 421);
+			this.Controls.Add(this.help);
+			this.Controls.Add(this.cancel);
+			this.Controls.Add(this.apply);
+			this.Controls.Add(this.caCertificateTab);
+			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+			this.Name = "ProxyPanel";
+			this.Text = "Certificate System Proxy Configuration";
+			this.caCertificateTab.ResumeLayout(false);
+			this.about.ResumeLayout(false);
+			this.caCertificatePanel.ResumeLayout(false);
+			this.adpanel.ResumeLayout(false);
+			this.groupBox4.ResumeLayout(false);
+			this.caconfig.ResumeLayout(false);
+			this.groupBox3.ResumeLayout(false);
+			this.groupBox2.ResumeLayout(false);
+			this.groupBox1.ResumeLayout(false);
+			this.debug.ResumeLayout(false);
+			this.ResumeLayout(false);
+
+		}
+		#endregion
+
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		[STAThread]
+		static void Main() 
+		{
+			Application.Run(new ProxyPanel());
+		}
+
+		private void populateLDAP_Click(object sender, System.EventArgs e)
+		{
+
+			String name = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
+
+			if (certtextbox.Text == "") 
+			{
+				DialogResult dr = MessageBox.Show("No CA Certificate has been set in the CA Certificate tab.  Continue?", "Alert", MessageBoxButtons.OKCancel);
+				if (dr == DialogResult.Cancel) 
+				{
+					return;
+				}
+			}
+			clearADLog();
+			// Find the Configuration Naming Context from the RootDSE
+			DirectoryEntry rootDSE = new DirectoryEntry("LDAP://RootDSE");		
+			rootDSE.AuthenticationType = AuthenticationTypes.Secure;
+			String cnc = rootDSE.Properties["configurationNamingContext"][0].ToString();
+			String rootpath = rootDSE.Path;
+			rootpath.Replace("RootDSE","");
+
+			adLog("Configuration Naming Context: "+cnc);
+			// Traverse down the Conviguration Naming Context...
+			DirectoryEntry configBase = new DirectoryEntry("LDAP://"+cnc);
+			configBase.AuthenticationType = AuthenticationTypes.Secure;
+
+			DirectorySearcher ds = new DirectorySearcher();
+
+			// Find CN=Services subtree of CN=Configuration	
+			ds.SearchRoot = configBase;
+			ds.SearchScope = SearchScope.OneLevel;
+			ds.Filter = "(CN=Services)";
+			SearchResult servicesResult =  ds.FindOne();
+			
+			DirectoryEntry servicesBase = servicesResult.GetDirectoryEntry();
+			String sb_n = servicesBase.Path;
+			adLog("Services base: "+sb_n);
+			
+			if (servicesBase == null) 
+			{
+				DialogResult dr =  MessageBox.Show("Error: Could not locate 'CN=Services' under base"+
+					ds.SearchRoot.Name.ToString());
+			}
+
+			// Find "CN=Public Key Services" subtree of CN=Services
+			ds.SearchRoot = servicesBase;
+			ds.Filter = "(CN=Public Key Services)";
+			SearchResult pubkeyResult = ds.FindOne();
+			DirectoryEntry pubkeyServicesBase = pubkeyResult.GetDirectoryEntry();
+			adLog("Services base: "+pubkeyServicesBase.Path);
+
+			if (pubkeyServicesBase == null) 
+			{
+				MessageBox.Show("Error: Could not locate 'CN=Public Key Services' under base"+
+					ds.SearchRoot.Name.ToString());
+				return;
+			}
+
+			// Find other subtrees of "CN=Public Key Services"
+			ds.SearchRoot = pubkeyServicesBase;
+
+			ds.Filter = "(CN=Certificate Templates)";
+			SearchResult certificateTemplatesBaseResult = ds.FindOne();
+			DirectoryEntry certificateTemplatesBase = certificateTemplatesBaseResult.GetDirectoryEntry();
+			certificateTemplatesBase.AuthenticationType = AuthenticationTypes.Secure;
+			
+			ds.Filter = "(CN=Certification Authorities)";
+			SearchResult certificationAuthoritiesBaseResult = ds.FindOne();
+			DirectoryEntry certificationAuthoritiesBase = certificationAuthoritiesBaseResult.GetDirectoryEntry();
+			certificationAuthoritiesBase.AuthenticationType = AuthenticationTypes.Secure;
+
+			ds.Filter = "(CN=Enrollment Services)";
+			SearchResult enrollmentServicesBaseResult = ds.FindOne();
+			DirectoryEntry enrollmentServicesBase = enrollmentServicesBaseResult.GetDirectoryEntry();
+			enrollmentServicesBase.AuthenticationType = AuthenticationTypes.Secure;
+
+			// I used to have code to add the certificate templates, but while the
+			// WebServer template works fine, the same cannot be said for the DomainController
+			// template. A better way to set up the templates is to use the Certificate Templates
+			// Snap-in in MCC (MCC should ask you to populate the templates when the Snap-in
+			// is started.
+			
+			//addCertificateTemplates(certificateTemplatesBase);
+
+			// xxx hardcoded string here
+			//String cacertb64 = "MIIB8TCCAZugAwIBAgIBATANBgkqhkiG9w0BAQUFADBJMScwJQYDVQQKEx5TZmJheSBSZWRoYXQgRG9tYWluIDIwMDYwNTEwZTExHjAcBgNVBAMTFUNlcnRpZmljYXRlIEF1dGhvcml0eTAeFw0wNjA1MTAyMTE2NDVaFw0wODA0MjkyMTE2NDVaMEkxJzAlBgNVBAoTHlNmYmF5IFJlZGhhdCBEb21haW4gMjAwNjA1MTBlMTEeMBwGA1UEAxMVQ2VydGlmaWNhdGUgQXV0aG9yaXR5MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMHjZuV2cWg0Gg8vuVHMaw8dhnbN+28w2TFMiNyqCodCuXCFiduHMRpFkmd9s3Png8oUnceRlGls04CSUIO8g9kCAwEAAaNuMGwwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAcYwSQYIKwYBBQUHAQEEPTA7MDkGCCsGAQUFBzABhi1odHRwOi8vYWlyLnNmYmF5LnJlZGhhdC5jb206OTA4MC9vY3NwL2VlL29jc3AwDQYJKoZIhvcNAQEFBQADQQACdQDRYLpJywjd5SfVmPLNEFaLvi3q5E37t6eD7tNuNE42LU+GLN8e95QHDzG3tCKnT6HjP9wWvcrFBWaxJBU0";
+			String cacertb64 = certtextbox.Text.
+				Replace(begincertificate_str,"").
+				Replace(endcertificate_str,"");
+			byte[] cacert = Convert.FromBase64String(cacertb64);
+			DirectoryEntry d = addCertificationAuthorities(certificationAuthoritiesBase,cacert);
+			addEnrollmentServices(enrollmentServicesBase, d, cacert);
+
+		}
+
+
+		byte[] daysToByteArray(ulong days)
+		{
+			ulong x = days * 86400 * 10000000;
+			x = 0-x;
+			byte[] r = new byte[8];
+			for (int i=0;i<8;i++) 
+			{
+				r[i] = (byte) (x & 0xff);
+				x>>=8;
+			}
+			return r;
+		}
+
+
+
+
+		void clearADLog()
+		{
+			dslog.Clear();
+		}
+
+		void adLog(string s)
+		{
+			dslog.AppendText(s+"\r\n");
+		}
+
+		private void addCertsToComboBox()
+		{
+			string[] sn = new string[cids.Length];
+			int sl=0;
+			foreach (CertIdentifier c in cids)
+			{
+				sn[sl] = c.subjectname;
+				sl++;
+			}
+			this.clientCertSelection.Text = sn[0];
+			this.clientCertSelection.Items.AddRange(sn);
+		}
+
+		DirectoryEntry addCertificationAuthorities(DirectoryEntry d, byte[] cacert)
+		{
+			DirectoryEntry n = null;
+			adLog("Searching for 'CN=Red Hat Certificate System Proxy' under base "+d.Name);
+			try 
+			{
+				n = d.Children.Find("CN=Red Hat Certificate System Proxy");		
+			} catch (Exception e) 
+			{ 
+				String s = e.Message;
+			}
+			if (n != null) {
+				adLog("Found "+n.Name);
+				if (overwrite.Checked) 
+				{
+					adLog("Removing");
+					d.Children.Remove(n);
+				} 
+				else 
+				{
+					return n;
+				}
+			}
+
+			adLog("Adding 'CN=Red Hat Certificate System Proxy'");
+			n = d.Children.Add("CN=Red Hat Certificate System Proxy","certificationAuthority");
+			n.Properties["cn"].Add("Red Hat Certificate System Proxy");
+			byte[] b = new byte[1];
+			b[0] = 0;
+			n.Properties["certificateRevocationList"].Add(b);
+			if (cacert != null) 
+			{
+				n.Properties["caCertificate"].Add(cacert);
+			}
+			n.Properties["authorityRevocationList"].Add(b);
+			n.CommitChanges();
+			return n;
+		}
+
+		void addEnrollmentServices(DirectoryEntry d, DirectoryEntry ca, byte[] cacert)
+		{
+			String entryname = "CN=Red Hat Certificate System Proxy";
+			DirectoryEntry n=null;
+			adLog("Searching for 'CN=Red Hat Certificate System Proxy' under base "+d.Name);
+			try 
+			{
+				n = d.Children.Find(entryname);
+			} 
+			catch (Exception e) { String s = e.Message; }
+			if (n != null) {
+				adLog("Found "+n.Name);
+				if (overwrite.Checked) 
+				{
+					adLog("Removing");
+					d.Children.Remove(n);
+				} 
+				else 
+				{
+					return;
+				}
+			}
+
+			adLog("Adding '"+entryname+"'");
+			n = d.Children.Add(entryname,"pkiEnrollmentService");
+			String hostname = Dns.GetHostName();
+			IPHostEntry ipe = Dns.GetHostByName(hostname);
+			String name = ipe.HostName;
+
+
+			adLog("Adding attribute: dNSHostName: "+name);
+			n.Properties["dNSHostName"].Add( name );
+			if (cacert != null) 
+			{
+				n.Properties["caCertificate"].Add (cacert);
+			}
+			// XXX hardcoded!!
+			//n.Properties["caCertificateDN"].Add (ca.Name);
+			string can = ca.Name;
+			adLog("Adding attribute: caCertificateDN: "+can);
+			n.Properties["caCertificateDN"].Add ("CN=Certificate Authority,O=Sfbay Redhat Domain 20060510e1");
+			n.Properties["certificateTemplates"].Add("WebServer");
+			n.Properties["certificateTemplates"].Add("User");
+			n.Properties["certificateTemplates"].Add("Workstation");
+			n.Properties["certificateTemplates"].Add("Machine");
+			n.Properties["certificateTemplates"].Add("DomainController");
+			n.CommitChanges();
+
+		}
+
+		
+
+		private void cancel_Click(object sender, System.EventArgs e)
+		{
+			DialogResult dr = MessageBox.Show("Discard unsaved changes?", "Alert", MessageBoxButtons.OKCancel);
+			if (dr == DialogResult.Cancel) 
+			{
+				return;
+			}
+
+			Close();
+		}
+
+		private RegistryKey getConfigRoot()
+		{
+			RegistryKey r = Registry.LocalMachine.
+							OpenSubKey("SOFTWARE\\Red Hat\\RHCSProxy");
+			RegistryKey r2 = r.OpenSubKey("Config",true);
+			return r2;
+		}
+
+		private static bool compareByteArrays (byte[] data1, byte[] data2)
+		{
+			// If both are null, they're equal
+			if (data1==null && data2==null)
+			{
+				return true;
+			}
+			// If either but not both are null, they're not equal
+			if (data1==null || data2==null)
+			{
+				return false;
+			}
+			if (data1.Length != data2.Length)
+			{
+				return false;
+			}
+			for (int i=0; i < data1.Length; i++)
+			{
+				if (data1[i] != data2[i])
+				{
+					return false;
+				}
+			}
+			return true;
+		}
+
+		private void getClientCertRegistryConfig()
+		{
+			RegistryKey r = getConfigRoot();
+			byte[] b = (byte[])r.GetValue("AuthenticationCertificate");
+			if (b == null) { return; }
+
+			for (int i=0; i<cids.Length; i++) 
+			{
+				if (compareByteArrays(cids[i].hash,b)) 
+				{
+					clientCertSelection.SelectedIndex = i;
+					break;
+				}
+			}
+		}
+
+		private void updateClientCertRegistry(byte[] b)
+		{
+			RegistryKey r = getConfigRoot();			
+			r.SetValue("AuthenticationCertificate",b);
+		}
+		private void change_Certificate(object sender, System.EventArgs e)
+		{
+			ComboBox c = (ComboBox) sender;
+			string s = (string)c.SelectedItem;
+			foreach (CertIdentifier ci in cids) 
+			{
+				if (ci.subjectname == s) 
+				{					
+					// remember the value
+					// we will only write it to the registry when
+					// user presses APPLY button
+					config_clientCertificate = ci.hash;
+
+				}
+
+			}
+
+		}
+		private void updateCACertRegistry()
+		{
+			getConfigRoot().SetValue("CACertificate",cacertificate_bin);
+		}
+		private void getCACertRegistry()
+		{
+			byte[] b = (byte[])getConfigRoot().GetValue("CACertificate");
+			if (b!=null) 
+			{			
+				string s = begincertificate_str+"\r\n"+
+					Convert.ToBase64String(b) +
+					"\r\n"+endcertificate_str+"\r\n";
+				certtextbox.Text = s;
+				setcacert_go(s);
+			}
+		}
+
+		private void getCAListRegistry()
+		{
+			RegistryKey r = getConfigRoot().OpenSubKey("CertificateAuthorities");
+			string[] sa = r.GetSubKeyNames();
+			foreach (string s in sa) 
+			{
+				RegistryKey rs = r.OpenSubKey(s);
+				string host = (string) rs.GetValue("hostname");
+				string port = (string) rs.GetValue("port");
+				string catype_int = (string) rs.GetValue("catype");
+				string catype = "unknown";
+				switch (catype_int) 
+				{
+					case "1":
+						catype = "Netscape CMS 6.1 or earlier";
+						break;
+					case "2":
+						catype = "Red Hat CS 7.1";
+						break;
+					case "3":
+						catype = "Red Hat CS 7.2";
+						break;
+					case "4":
+						catype = "Red Hat CS 7.3";
+						break;
+				}
+				calist.Items.Add(new ListViewItem(new string[] { host, port, catype }));
+			}
+		}
+
+		private void updateCAListRegistry(ListView.ListViewItemCollection lvi)
+		{
+			RegistryKey r = getConfigRoot().OpenSubKey("CertificateAuthorities",true);
+
+			string [] sa = r.GetSubKeyNames();
+			foreach (string s in sa) 
+			{
+				try 
+				{
+					r.DeleteSubKeyTree(s);
+				} 
+				catch (UnauthorizedAccessException e) 
+				{
+					MessageBox.Show("Failed to modify config parameter."+e.GetBaseException());
+				}
+			}
+			int i=0;
+			foreach (ListViewItem l in lvi) 
+			{
+				i++;
+				RegistryKey rsub = r.CreateSubKey(""+i);
+				rsub.SetValue("hostname",l.SubItems[0].Text);
+				rsub.SetValue("port",l.SubItems[1].Text);
+				switch (l.SubItems[2].Text) 
+				{
+					case "Netscape CMS 6.1 or earlier":
+						rsub.SetValue("catype",""+1);
+						break;
+					case "Red Hat CS 7.1":
+						rsub.SetValue("catype",""+2);
+						break;
+					case "Red Hat CS 7.2":
+						rsub.SetValue("catype",""+3);
+						break;
+					case "Red Hat CS 7.3":
+						rsub.SetValue("catype",""+4);
+						break;
+					default:
+						break;
+				}
+			}
+		}
+
+		private void apply_Click(object sender, System.EventArgs e)
+		{
+			if (config_clientCertificate != null) 
+				updateClientCertRegistry(config_clientCertificate);
+
+			if (config_calistchanged) 
+				updateCAListRegistry(calist.Items);
+			
+			if (config_cacertificate)
+				updateCACertRegistry();
+
+			saveLogOptionsRegistry();
+
+			Close();
+		}
+
+		private void addca_Click(object sender, System.EventArgs e)
+		{
+			if (hosttextbox.Text == "" ||
+				porttextbox.Text == "" ||
+				catypecombobox.Text == "") 
+			{
+				return;
+			}
+
+		
+			ListViewItem lvi = new ListViewItem(new string[] {
+										hosttextbox.Text,
+										porttextbox.Text,
+										catypecombobox.Text} );
+			calist.Items.Add(lvi);
+
+			hosttextbox.Text = "";
+			porttextbox.Text = "";
+			catypecombobox.Text = "";
+
+			config_calistchanged = true;
+
+		}
+
+		private void removeca_Click(object sender, System.EventArgs e)
+		{
+			if (calist.Items.Count == 0) { return; }
+			if (calist.SelectedItems == null ||
+				calist.SelectedItems.Count == 0) { return; }
+
+			// won't work for multiple selection
+			foreach (int p in calist.SelectedIndices) 
+			{
+				calist.Items.RemoveAt(p);
+			}
+
+			config_calistchanged = true;
+		}
+		
+		private void setcacert_go(string bare)
+		{
+			bare = bare.Replace(begincertificate_str,"");
+			bare = bare.Replace(endcertificate_str,"");
+			cacertificate_bin = Convert.FromBase64String(bare);
+			X509Certificate cert = new X509Certificate(cacertificate_bin);
+			caname.Text = cert.GetName();
+			populateLDAP.Enabled = true;
+
+		}
+
+		private void setcacert_Click(object sender, System.EventArgs e)
+		{
+			if (certtextbox.Text == "") { return; }
+			string bare = certtextbox.Text;
+			try 
+			{
+				setcacert_go(bare);
+				config_cacertificate = true;
+			}
+			catch (System.FormatException ex)
+			{
+				String s = ex.Message;;
+			}
+			catch (System.Security.Cryptography.CryptographicException ec)
+			{
+				MessageBox.Show("Error decoding certificate. Make sure you are selecting\r\n"+
+				                "a certificate, not a PKCS#7 certificate chain\r\n"+
+								"Detailed error message follows:\r\n "+ec.Message);
+			}
+			populateLDAP.Enabled = true;
+
+		}
+
+		private void launchEventViewer_Click(object sender, System.EventArgs e)
+		{
+			System.Diagnostics.Process p = Process.Start("eventvwr.exe");
+		}
+
+
+
+		private long LOG_REQ       = 0x0001;
+		private long LOG_CERT      = 0x0002;
+		private long LOG_MISC      = 0x0004;
+		private long LOG_D_COM     = 0x0010;
+		private long LOG_D_CONFIG  = 0x0020;
+		private long LOG_D_CA      = 0x0040;
+		private long LOG_D_FUNC    = 0x0080;
+		private long LOG_D_DETAIL  = 0x0100;
+		
+
+		// log panel
+		// 1) setting widget enable/disable based on registry
+		private void getLogOptionsRegistry()
+		{
+			long options = LOG_REQ | LOG_CERT | LOG_MISC;
+			try 
+			{
+				string options_str = (string)getConfigRoot().GetValue("LogOptions");
+				options = Int32.Parse(options_str);
+			} 
+			catch (Exception e) { String s = e.Message; }
+
+			log_req.Checked = (options & LOG_REQ) > 0;
+			log_cert.Checked = (options & LOG_CERT) > 0;
+			log_misc.Checked = (options & LOG_MISC) > 0;
+			log_d_com.Checked = (options & LOG_D_COM) > 0;
+			log_d_config.Checked = (options & LOG_D_CONFIG) > 0;
+			log_d_ca.Checked = (options & LOG_D_CA) > 0;
+			log_d_func.Checked = (options & LOG_D_FUNC) > 0;
+			log_d_detail.Checked = (options & LOG_D_DETAIL) > 0;
+		}
+
+		// 2) applying changes back to the registry
+
+		private void saveLogOptionsRegistry()
+		{
+			long options = 0;
+
+			options |= log_req.Checked      ? LOG_REQ      : 0;
+			options |= log_cert.Checked     ? LOG_CERT     : 0;
+			options |= log_misc.Checked     ? LOG_MISC     : 0;
+
+			options |= log_d_com.Checked    ? LOG_D_COM    : 0;
+			options |= log_d_config.Checked ? LOG_D_CONFIG : 0;
+			options |= log_d_ca.Checked     ? LOG_D_CA     : 0;
+			options |= log_d_func.Checked   ? LOG_D_FUNC   : 0;
+			options |= log_d_detail.Checked ? LOG_D_DETAIL : 0;
+			getConfigRoot().SetValue("LogOptions",options);
+		}
+
+		private void load_Click(object sender, System.EventArgs e)
+		{
+			if (openFileDialog1.ShowDialog() != DialogResult.OK) 
+			{
+				return;
+			}
+
+			// read selected file into buffer
+			FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open, FileAccess.Read);
+			BinaryReader br = new BinaryReader(fs);
+			byte[] b = new byte[10240];
+			int bytes = br.Read(b,0,10240);
+			byte[] c = new byte[bytes];
+			Array.Copy(b,0,c,0,bytes);
+			// convert to base 64
+			
+			string s = Convert.ToBase64String(c);
+			// convert to PEM, adding begin/end certificate markers, and truncating to max
+			// 30 chars per line.
+			string o = begincertificate_str+"\r\n";
+
+			int i=0;
+			int maxline = 50;
+			while (i < s.Length) 
+			{
+				int j = maxline;
+				if (s.Length-i < maxline) { j = s.Length-i; }
+				o = o + s.Substring(i,j) + "\r\n";
+				i += maxline;
+			}
+			o+= endcertificate_str +"\r\n";
+
+			certtextbox.Text = o;
+			setcacert_Click(sender,e);   // args ignored by callee
+
+			
+		}
+
+		private void label7_Click(object sender, System.EventArgs e)
+		{
+		
+		}
+	}
+}


--- NEW FILE ProxyPanel.resx ---
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 1.3
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">1.3</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1">this is my long string</data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        [base64 mime encoded serialized .NET Framework object]
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        [base64 mime encoded string representing a byte array form of the .NET Framework object]
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used forserialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>1.3</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="caCertificateTab.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="caCertificateTab.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="caCertificateTab.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="caCertificateTab.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caCertificateTab.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caCertificateTab.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="about.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="about.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="about.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="about.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="about.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="about.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="linkLabel1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="linkLabel1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="linkLabel1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label7.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label7.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label7.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label6.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label6.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label6.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caCertificatePanel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="caCertificatePanel.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="caCertificatePanel.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="caCertificatePanel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caCertificatePanel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caCertificatePanel.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="load.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="load.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="load.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label12.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label12.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label12.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="setcacert.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="setcacert.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="setcacert.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caname.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caname.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="caname.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="certtextbox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="certtextbox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="certtextbox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="adpanel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="adpanel.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="adpanel.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="adpanel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="adpanel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="adpanel.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="groupBox4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="groupBox4.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="groupBox4.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="groupBox4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="groupBox4.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="groupBox4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="overwrite.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="overwrite.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="overwrite.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label8.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label8.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label8.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="dslog.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="dslog.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="dslog.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="populateLDAP.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="populateLDAP.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="populateLDAP.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caconfig.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="caconfig.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="caconfig.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="caconfig.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caconfig.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="caconfig.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="label5.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label5.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label5.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="groupBox3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="groupBox3.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="groupBox3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="groupBox3.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="groupBox3.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="groupBox3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="cmc.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="cmc.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="cmc.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="pkcs10.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="pkcs10.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="pkcs10.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="groupBox2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="groupBox2.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="groupBox2.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="groupBox2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="groupBox2.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="groupBox2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="clientCertSelection.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="clientCertSelection.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="clientCertSelection.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="porttextbox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="porttextbox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="porttextbox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="hosttextbox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="hosttextbox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="hosttextbox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="removeca.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="removeca.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="removeca.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="addca.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="addca.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="addca.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="calist.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="calist.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="calist.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="Host.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="Host.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="Port.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="Port.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="CAType.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="CAType.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="groupBox1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="groupBox1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="groupBox1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="groupBox1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="groupBox1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="catypecombobox.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="catypecombobox.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="catypecombobox.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="debug.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="debug.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="debug.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="debug.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="debug.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="debug.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="log_misc.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="log_misc.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_misc.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_detail.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="log_d_detail.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_detail.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_func.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="log_d_func.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_func.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_ca.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="log_d_ca.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_ca.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_config.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="log_d_config.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_config.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_com.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="log_d_com.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_d_com.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="launchEventViewer.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="launchEventViewer.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="launchEventViewer.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label11.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label11.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label11.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label10.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label10.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label10.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_cert.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="log_cert.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_cert.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_req.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="log_req.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="log_req.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label9.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="label9.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="label9.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="apply.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="apply.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="apply.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="cancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="cancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="cancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="help.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="help.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="help.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="openFileDialog1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="openFileDialog1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="openFileDialog1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </data>
  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>(Default)</value>
  </data>
  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>False</value>
  </data>
  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>8, 8</value>
  </data>
  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>80</value>
  </data>
  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </data>
  <data name="$this.Name">
    <value>ProxyPanel</value>
  </data>
  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>Private</value>
  </data>
  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        AAABAAIAEBAQAAAAAAAoAQAAJgAAACAgEAAAAAAA6AIAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAIAA
        AAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
        AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAHd3d3d3cAAAe7u7t3/4hwh7uIu3eIiI/3u4
        C7d4+I/4e7cLt3j/+Ih7twu3ePiIj3u7u7t4+IiPe7u7t3j/iP/3CIgIePiIiIcIiAh4j/iIj3AHAHiI
        iI/4d3AACHd4iIiPcAAAAAh3ePhwAAAAAAAId3AA//8AAL8AAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAQAAAAEAAIADAAD4BwAA/4cAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAA
        AAAAAAAAEAAAABAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD/
        /wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AcAAAAAAAAA
        AAAAAAAACPh3AAcAAAAAMzMzMzMzAAj///h3AAcAA7u7u7u7MzAP+IiP//h3AAu7u7ALu7MwD/iIiIj/
        //h7u7uwA7uzMA/4///4iIj/e7u7sAO7szAPiP+I//+IiHu7u7AAO7MwD/j/eHeI//97u7swADuzMA+I
        ////93eIe7u7swO7szAP+P+P///4iHu7u7u7u7MwD/j/iHiI//97uzuIiIuzMA/4/4j4iHf/ezdwf/+H
        M4AP+P+IeIj//3O4cHiIiAAAD4j///+IiP+DOHBzM3hwAA+I//+P/////whwADAHcAAPiP/4h4iP//8I
        hwAAd3cAD4j/iP+Ih4iPd4d3d3dwAA/4/4h4iP+Id3CId3d3cAAP+I//+Ih4iP/3eId3dwAAD/iIj///
        +Ih4iHB4iHAAAA//+IiIj///+IiIcAAAAAAHeP//iIeIj////4jwAAAAAAB3eP//iIiIj/+I8AAAAAAH
        AAB3eP/4iIiIiPAAAAAAAAAHAAAHeP/4iIjwAAAAAAAAAAAAcAAHeP//8AAAAAAAAAAAAAAAcAAHePAA
        AAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////wP/
        wAEAP4AAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA
        AAEAAAABAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAA/4AAAP/4AAD//8AA///8AP///8D///////////w==
</value>
  </data>
</root>

--- NEW FILE WinCapi.cs ---
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using System.ComponentModel;



namespace ProxyPanel
{
	/// <summary>
	/// 
	/// </summary>
	/// 

	public struct CertIdentifier
	{
		public string subjectname;
		public byte[] hash;

	}

	public class WinCapi
	{

/*
 HCERTSTORE   WINAPI CertOpenSystemStore(HCRYPTPROV hprov, LPTCSTR szSubsystemProtocol);
 BOOL      WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags);

 PCCERT_CONTEXT WINAPI CertFindCertificateInStore(
  HCERTSTORE hCertStore,
  DWORD dwCertEncodingType,
  DWORD dwFindFlags,
  DWORD dwFindType,
  const void* pvFindPara,
  PCCERT_CONTEXT pPrevCertContext);

BOOL WINAPI CertFreeCertificateContext(
  PCCERT_CONTEXT pCertContext
);
*/

 [DllImport("crypt32.dll", CharSet=CharSet.Auto, SetLastError=true)]
    public static extern IntPtr CertOpenSystemStore(
   IntPtr hCryptProv,
   string storename) ;

 [DllImport("crypt32.dll", SetLastError=true)]
    public static extern bool CertCloseStore(
   IntPtr hCertStore,
   uint dwFlags) ;

 [DllImport("crypt32.dll", SetLastError=true)]
    public static extern IntPtr CertFindCertificateInStore(
   IntPtr hCertStore,
   uint dwCertEncodingType,
   uint dwFindFlags,
   uint dwFindType,
   [In, MarshalAs(UnmanagedType.LPWStr)]String pszFindString,
   IntPtr pPrevCertCntxt) ;

 [DllImport("crypt32.dll", SetLastError=true)]
    public static extern bool CertFreeCertificateContext(
   IntPtr hCertStore) ;

		public WinCapi()
		{
			
		}

		private byte[] hexToByteArray(string s)
		{
			if (s == null || s.Length == 0 || (s.Length %2 != 0)) 
			{
				return null;
			}

			byte[] b = new byte[s.Length/2];
			for (int i=0; i<s.Length; i+=2) 
			{
				b[i/2] = Convert.ToByte(s.Substring(i,2),16);
			}
			return b;
		}

		public CertIdentifier[] getMyCertNames()
		{
			const string MY   = "MY";
			const uint PKCS_7_ASN_ENCODING    = 0x00010000;
			const uint X509_ASN_ENCODING       = 0x00000001;
			const uint CERT_FIND_SUBJECT_STR   = 0x00080007;

			uint MY_ENCODING_TYPE    = PKCS_7_ASN_ENCODING | X509_ASN_ENCODING ;

			string lpszCertSubject = "" ;

			IntPtr hSysStore  = IntPtr.Zero;
			IntPtr hCertCntxt = IntPtr.Zero;

			hSysStore = WinCapi.CertOpenSystemStore(IntPtr.Zero, MY) ;
			Console.WriteLine("Store Handle:\t0x{0:X}", hSysStore.ToInt32());

			ArrayList certs = new ArrayList();


			if(hSysStore != IntPtr.Zero)
			{

				hCertCntxt=WinCapi.CertFindCertificateInStore(
					hSysStore,
					MY_ENCODING_TYPE,
					0, 
					CERT_FIND_SUBJECT_STR,
					lpszCertSubject ,
					IntPtr.Zero) ;

				do 
				{  
					Console.WriteLine("CertContext:\t0x{0:X}", hCertCntxt.ToInt32()) ;
					X509Certificate foundcert = new X509Certificate(hCertCntxt);
					Console.WriteLine("\nFound certificate with SubjectName string \"{0}\"",lpszCertSubject); 
					Console.WriteLine("SubjectName:\t{0}", foundcert.GetName());
					Console.WriteLine("Serial No:\t{0}", foundcert.GetSerialNumberString());
					Console.WriteLine("HashString:\t{0}" , foundcert.GetCertHashString());
					CertIdentifier cid = new CertIdentifier();
					string d = "Serial: "+foundcert.GetSerialNumberString() + "  Name: "+foundcert.GetName();
					cid.subjectname = d;

					cid.hash = hexToByteArray(foundcert.GetCertHashString());
					certs.Add(cid);

					// get next cert
					hCertCntxt=WinCapi.CertFindCertificateInStore(
						hSysStore,
						MY_ENCODING_TYPE,
						0, 
						CERT_FIND_SUBJECT_STR,
						lpszCertSubject ,
						hCertCntxt) ;

				} while (hCertCntxt != IntPtr.Zero);
			
			}
			return (CertIdentifier[])certs.ToArray(typeof(CertIdentifier));

		}
	

	}

}



--- NEW FILE cert.ico ---


--- NEW FILE panel.csproj ---
<VisualStudioProject>
    <CSHARP
        ProjectType = "Local"
        ProductVersion = "7.10.3077"
        SchemaVersion = "2.0"
        ProjectGuid = "{8BCDD8FE-11BC-4CC0-A66C-03DF9C746A91}"
    >
        <Build>
            <Settings
                ApplicationIcon = ""
                AssemblyKeyContainerName = ""
                AssemblyName = "panel"
                AssemblyOriginatorKeyFile = ""
                DefaultClientScript = "JScript"
                DefaultHTMLPageLayout = "Grid"
                DefaultTargetSchema = "IE50"
                DelaySign = "false"
                OutputType = "WinExe"
                PreBuildEvent = ""
                PostBuildEvent = ""
                RootNamespace = "panel"
                RunPostBuildEvent = "OnBuildSuccess"
                StartupObject = ""
            >
                <Config
                    Name = "Debug"
                    AllowUnsafeBlocks = "false"
                    BaseAddress = "285212672"
                    CheckForOverflowUnderflow = "false"
                    ConfigurationOverrideFile = ""
                    DefineConstants = "DEBUG;TRACE"
                    DocumentationFile = ""
                    DebugSymbols = "true"
                    FileAlignment = "4096"
                    IncrementalBuild = "false"
                    NoStdLib = "false"
                    NoWarn = ""
                    Optimize = "false"
                    OutputPath = "bin\Debug\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "4"
                />
                <Config
                    Name = "Release"
                    AllowUnsafeBlocks = "false"
                    BaseAddress = "285212672"
                    CheckForOverflowUnderflow = "false"
                    ConfigurationOverrideFile = ""
                    DefineConstants = "TRACE"
                    DocumentationFile = ""
                    DebugSymbols = "false"
                    FileAlignment = "4096"
                    IncrementalBuild = "false"
                    NoStdLib = "false"
                    NoWarn = ""
                    Optimize = "true"
                    OutputPath = "bin\Release\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "4"
                />
            </Settings>
            <References>
                <Reference
                    Name = "System"
                    AssemblyName = "System"
                    HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
                />
                <Reference
                    Name = "System.Data"
                    AssemblyName = "System.Data"
                    HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
                />
                <Reference
                    Name = "System.Drawing"
                    AssemblyName = "System.Drawing"
                    HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
                />
                <Reference
                    Name = "System.Windows.Forms"
                    AssemblyName = "System.Windows.Forms"
                    HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
                />
                <Reference
                    Name = "System.XML"
                    AssemblyName = "System.Xml"
                    HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
                />
                <Reference
                    Name = "system.directoryservices"
                    AssemblyName = "System.DirectoryServices"
                    HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\system.directoryservices.dll"
                />
            </References>
        </Build>
        <Files>
            <Include>
                <File
                    RelPath = "AssemblyInfo.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "ProxyPanel.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "ProxyPanel.resx"
                    DependentUpon = "ProxyPanel.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "WinCapi.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
            </Include>
        </Files>
    </CSHARP>
</VisualStudioProject>



--- NEW FILE panel.csproj.user ---
<VisualStudioProject>
    <CSHARP LastOpenVersion = "7.10.3077" >
        <Build>
            <Settings ReferencePath = "" >
                <Config
                    Name = "Debug"
                    EnableASPDebugging = "false"
                    EnableASPXDebugging = "false"
                    EnableUnmanagedDebugging = "false"
                    EnableSQLServerDebugging = "false"
                    RemoteDebugEnabled = "false"
                    RemoteDebugMachine = ""
                    StartAction = "Project"
                    StartArguments = ""
                    StartPage = ""
                    StartProgram = ""
                    StartURL = ""
                    StartWorkingDirectory = ""
                    StartWithIE = "false"
                />
                <Config
                    Name = "Release"
                    EnableASPDebugging = "false"
                    EnableASPXDebugging = "false"
                    EnableUnmanagedDebugging = "false"
                    EnableSQLServerDebugging = "false"
                    RemoteDebugEnabled = "false"
                    RemoteDebugMachine = ""
                    StartAction = "Project"
                    StartArguments = ""
                    StartPage = ""
                    StartProgram = ""
                    StartURL = ""
                    StartWorkingDirectory = ""
                    StartWithIE = "true"
                />
            </Settings>
        </Build>
        <OtherProjectSettings
            CopyProjectDestinationFolder = ""
            CopyProjectUncPath = ""
            CopyProjectOption = "0"
            ProjectView = "ProjectFiles"
            ProjectTrust = "0"
        />
    </CSHARP>
</VisualStudioProject>





More information about the Fedora-directory-commits mailing list