Commit c2cac3ba authored by mohammadlachgar's avatar mohammadlachgar Committed by GitHub

Delete spaces and new lines(entr)

parent c8874b20
...@@ -93,7 +93,7 @@ namespace Titanium.Web.Proxy.Network ...@@ -93,7 +93,7 @@ namespace Titanium.Web.Proxy.Network
private readonly IDictionary<string, CachedCertificate> certificateCache; private readonly IDictionary<string, CachedCertificate> certificateCache;
private readonly Action<Exception> exceptionFunc; private readonly Action<Exception> exceptionFunc;
internal string Issuer internal string Issuer
{ {
get => issuer ?? defaultRootCertificateIssuer; get => issuer ?? defaultRootCertificateIssuer;
...@@ -201,15 +201,15 @@ namespace Titanium.Web.Proxy.Network ...@@ -201,15 +201,15 @@ namespace Titanium.Web.Proxy.Network
return null; return null;
} }
} }
/// <summary> /// <summary>
/// Attempts to create a RootCertificate /// Attempts to create a RootCertificate
/// </summary> /// </summary>
/// <param name="persistToFile">if set to <c>true</c> try to load/save the certificate from rootCert.pfx.</param> /// <param name="persistToFile">if set to <c>true</c> try to load/save the certificate from rootCert.pfx.</param>
/// <returns> /// <returns>
/// true if succeeded, else false /// true if succeeded, else false
/// </returns> /// </returns>
public bool CreateTrustedRootCertificate(bool persistToFile = true) public bool CreateTrustedRootCertificate(bool persistToFile = true)
{ {
if (persistToFile && RootCertificate == null) if (persistToFile && RootCertificate == null)
{ {
...@@ -455,9 +455,7 @@ namespace Titanium.Web.Proxy.Network ...@@ -455,9 +455,7 @@ namespace Titanium.Web.Proxy.Network
{ {
try try
{ {
if ((isRootCertificate == false) && (saveFakeCertificates == true)) { if ((isRootCertificate == false) && (saveFakeCertificates == true)) {
string path = GetCertPath(); string path = GetCertPath();
string subjectName = System.Text.RegularExpressions.Regex.Replace(certificateName, @"^CN\s*=\s*", "", System.Text.RegularExpressions.RegexOptions.IgnoreCase); string subjectName = System.Text.RegularExpressions.Regex.Replace(certificateName, @"^CN\s*=\s*", "", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
subjectName = subjectName.Replace("*", "$x$"); subjectName = subjectName.Replace("*", "$x$");
...@@ -480,12 +478,8 @@ namespace Titanium.Web.Proxy.Network ...@@ -480,12 +478,8 @@ namespace Titanium.Web.Proxy.Network
} }
} }
else { else {
certificate = this.makeCertificate(certificateName, isRootCertificate); certificate = this.makeCertificate(certificateName, isRootCertificate);
} }
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -580,7 +574,7 @@ namespace Titanium.Web.Proxy.Network ...@@ -580,7 +574,7 @@ namespace Titanium.Web.Proxy.Network
x509PersonalStore.Close(); x509PersonalStore.Close();
} }
} }
/// <summary> /// <summary>
/// Remove the Root Certificate trust /// Remove the Root Certificate trust
/// </summary> /// </summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment