Commit 77f0fdde authored by mohammadlachgar's avatar mohammadlachgar Committed by GitHub

change ProxyEndPoints.Any to ProxyEndPoints.OfType

change 
if (ProxyEndPoints.Any(x => (x as ExplicitProxyEndPoint).GenericCertificate == null))
to
if (ProxyEndPoints.OfType<ExplicitProxyEndPoint>().Any(x => x.GenericCertificate == null))
and add 
 throw new Exception(ex.Message);
parent 8fb9e60f
using StreamExtended.Network; using StreamExtended.Network;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -43,7 +43,7 @@ namespace Titanium.Web.Proxy ...@@ -43,7 +43,7 @@ namespace Titanium.Web.Proxy
private bool trustRootCertificate; private bool trustRootCertificate;
private bool saveCertificate = false; private bool saveCertificate=false;
/// <summary> /// <summary>
/// Password for export and load rootCert.pfx /// Password for export and load rootCert.pfx
...@@ -564,15 +564,15 @@ namespace Titanium.Web.Proxy ...@@ -564,15 +564,15 @@ namespace Titanium.Web.Proxy
} }
try try {
{ if (ProxyEndPoints.OfType<ExplicitProxyEndPoint>().Any(x => x.GenericCertificate == null))
if (ProxyEndPoints.Any(x => (x as ExplicitProxyEndPoint).GenericCertificate == null))
{ {
EnsureRootCertificate(); EnsureRootCertificate();
} }
} }
catch catch (Exception ex)
{ {
throw new Exception(ex.Message);
} }
//clear any system proxy settings which is pointing to our own endpoint (causing a cycle) //clear any system proxy settings which is pointing to our own endpoint (causing a cycle)
......
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