Unverified Commit eb68d296 authored by mohammadlachgar's avatar mohammadlachgar Committed by GitHub

remove cn from FriendlyName

change
@"^" + "CN".ToLower() + @"\s*=\s*"
to
^CN\s*=\s*
parent cf082423
using System;
using System;
using System.Collections;
using System.IO;
using System.Reflection;
......@@ -70,7 +70,7 @@ namespace Titanium.Web.Proxy.Network.Certificate
string issuerName, DateTime validFrom,
DateTime validTo, int keyStrength = 2048,
string signatureAlgorithm = "SHA256WithRSA",
AsymmetricKeyParameter issuerPrivateKey = null, X509Certificate2 cloneCertificate = null)
AsymmetricKeyParameter issuerPrivateKey = null, X509Certificate2 cloneCertificate=null)
{
// Generating Random Numbers
var randomGenerator = new CryptoApiRandomGenerator();
......@@ -149,7 +149,7 @@ namespace Titanium.Web.Proxy.Network.Certificate
{
try
{
x509Certificate.FriendlyName = System.Text.RegularExpressions.Regex.Replace(subjectName.ToLower(), @"^" + "CN".ToLower() + @"\s*=\s*", "");
x509Certificate.FriendlyName = System.Text.RegularExpressions.Regex.Replace(subjectName.ToLower(), @"^CN\s*=\s*", "");
}
catch (PlatformNotSupportedException)
{
......
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