Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ProjectGuid>{27758517-6CCF-46A0-9F3C-C9AC7A7DEE1B}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Holbor.MySelfSSL.Core</RootNamespace>
<AssemblyName>Holbor.MySelfSSL.Core</AssemblyName>
<AssemblyName>MySelfSSL</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
Expand All @@ -20,14 +20,18 @@
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>true</UpdateRequired>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<InstallUrl>https://www.holbor.com/programs/MySelfSSL/</InstallUrl>
<UpdateUrl>https://www.holbor.com/programs/MySelfSSL/</UpdateUrl>
<TargetCulture>en-US</TargetCulture>
<ProductName>MySelfSSL</ProductName>
<PublisherName>Darnley Costa</PublisherName>
<SuiteName>Holbor</SuiteName>
<MinimumRequiredVersion>1.0.2.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<ApplicationRevision>6</ApplicationRevision>
<WebPage>index.html</WebPage>
<ApplicationRevision>9</ApplicationRevision>
<ApplicationVersion>1.0.2.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Holbor.MySelfSSL.Front</RootNamespace>
<AssemblyName>Holbor.MySelfSSL.Front</AssemblyName>
<AssemblyName>MySelfSSL Front-end</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand Down Expand Up @@ -58,6 +58,11 @@
<DependentUpon>Main.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Status.cs">
<SubType>Form</SubType>
</Compile>
Expand All @@ -72,6 +77,10 @@
<EmbeddedResource Include="Main.resx">
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Status.resx">
<DependentUpon>Status.cs</DependentUpon>
</EmbeddedResource>
Expand Down
561 changes: 419 additions & 142 deletions Holbor.MySelfSSL/Holbor.MySelfSSL.Front/Main.Designer.cs

Large diffs are not rendered by default.

34 changes: 29 additions & 5 deletions Holbor.MySelfSSL/Holbor.MySelfSSL.Front/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ private void Init(object sender, EventArgs e)
LoadCertificateAuthorities();
EnableOrDisableCertificateFields();
comboBoxCertificateAuthorities.DisplayMember = "FriendlyName";
listBoxExistentCertificateAuthorities.DisplayMember = "FriendlyName";
}

private void LoadCertificateAuthorities()
Expand All @@ -43,6 +44,9 @@ private void LoadCertificateAuthorities()
// Keep the first certificate selected
comboBoxCertificateAuthorities.SelectedIndex = 0;
}

listBoxExistentCertificateAuthorities.Items.Clear();
listBoxExistentCertificateAuthorities.Items.AddRange(comboBoxCertificateAuthorities.Items.Cast<object>().ToArray());
}

private void CreateCertificate(object sender, EventArgs e)
Expand Down Expand Up @@ -229,13 +233,11 @@ private void EnableOrDisableCertificateFields()
{
groupBoxSelfSignedCertificate.Enabled = true;
buttonShowInformationCA.Enabled = true;
buttonDeleteCA.Enabled = true;
}
else
{
groupBoxSelfSignedCertificate.Enabled = false;
buttonShowInformationCA.Enabled = false;
buttonDeleteCA.Enabled = false;
tabControl1.SelectedIndex = 1;
buttonCreateCertificateCA.Focus();
}
Expand Down Expand Up @@ -378,18 +380,40 @@ private void OnClickInASANCA(object sender, EventArgs e)

private void ShowInformationAboutSelectedCA(object sender, EventArgs e)
{
MessageBox.Show(Certificate.CertificateToString(comboBoxCertificateAuthorities.SelectedItem), "Certificate Authority Information");
object selectedCertificate = null;

if (tabControl1.SelectedTab.Name.Equals("tabCertificateAuthority"))
{
selectedCertificate = listBoxExistentCertificateAuthorities.SelectedItem;
}
else if (tabControl1.SelectedTab.Name.Equals("tabIssue"))
{
selectedCertificate = comboBoxCertificateAuthorities.SelectedItem;
}

MessageBox.Show(Certificate.CertificateToString(selectedCertificate), "Certificate Authority Information");
}

private void DeleteSelectedCA(object sender, EventArgs e)
{
if (comboBoxCertificateAuthorities.SelectedIndex != -1)
object selectedCertificate = null;

if (tabControl1.SelectedTab.Name.Equals("tabCertificateAuthority"))
{
selectedCertificate = listBoxExistentCertificateAuthorities.SelectedItem;
}
else if (tabControl1.SelectedTab.Name.Equals("tabIssue"))
{
selectedCertificate = comboBoxCertificateAuthorities.SelectedItem;
}

if (selectedCertificate != null)
{
DialogResult dialogResult = MessageBox.Show("BE SURE OF WHAT YOU ARE DOING!\n\nAre you sure you want to delete this Certification Authority (CA)?\nOther certificates that have been created based on it WILL BE INVALIDATED.", "Delete Certificate", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

if (dialogResult == DialogResult.Yes)
{
X509Certificate2 certificateToDelete = (X509Certificate2)comboBoxCertificateAuthorities.SelectedItem;
X509Certificate2 certificateToDelete = (X509Certificate2)selectedCertificate;

Certificate.DeleteCertificate(certificateToDelete, true);

Expand Down
3 changes: 0 additions & 3 deletions Holbor.MySelfSSL/Holbor.MySelfSSL.Front/Main.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="toolTipHelp.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>147, 17</value>
</metadata>
<data name="label1.Text" xml:space="preserve">
<value>A self-signed certificate is a certificate that is signed by the person creating it rather than a trusted certificate authority. Self-signed certificates can enable the same level of encryption as a $1500 certificate signed by a trusted authority, but there are two major drawbacks: a visitor's connection could be hijacked allowing an attacker view all the data sent (thus defeating the purpose of encrypting the connection) and the certificate cannot be revoked like a trusted certificate can. </value>
</data>
<metadata name="headMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 120 additions & 0 deletions Holbor.MySelfSSL/Holbor.MySelfSSL.Front/Properties/Resources.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema

Version 2.0

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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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 for serialized 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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Holbor.MySelfSSL.Infrastructure</RootNamespace>
<AssemblyName>Holbor.MySelfSSL.Infrastructure</AssemblyName>
<AssemblyName>MySelfSSL Infrastructure</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand Down