Commit 3e3698bc authored by justcoding121's avatar justcoding121

update error msgs

parent a6f402f7
...@@ -295,8 +295,8 @@ namespace Titanium.Web.Proxy.Network ...@@ -295,8 +295,8 @@ namespace Titanium.Web.Proxy.Network
if (RootCertificate == null) if (RootCertificate == null)
{ {
exceptionFunc( exceptionFunc(
new Exception("Could not set root certificate" new Exception("Could not install certificate"
+ " as system proxy since it is null or empty.")); + " as it is null or empty."));
return; return;
} }
...@@ -330,11 +330,11 @@ namespace Titanium.Web.Proxy.Network ...@@ -330,11 +330,11 @@ namespace Titanium.Web.Proxy.Network
/// <returns></returns> /// <returns></returns>
private void UninstallCertificate(StoreName storeName, StoreLocation storeLocation, X509Certificate2 certificate) private void UninstallCertificate(StoreName storeName, StoreLocation storeLocation, X509Certificate2 certificate)
{ {
if (RootCertificate == null) if (certificate == null)
{ {
exceptionFunc( exceptionFunc(
new Exception("Could not set root certificate" new Exception("Could not remove certificate"
+ " as system proxy since it is null or empty.")); + " as it is null or empty."));
return; return;
} }
...@@ -653,12 +653,12 @@ namespace Titanium.Web.Proxy.Network ...@@ -653,12 +653,12 @@ namespace Titanium.Web.Proxy.Network
return false; return false;
} }
string pfxFileName = Path.GetTempFileName();
File.WriteAllBytes(pfxFileName, RootCertificate.Export(X509ContentType.Pkcs12, PfxPassword));
//currentUser\Personal //currentUser\Personal
InstallCertificate(StoreName.My, StoreLocation.CurrentUser); InstallCertificate(StoreName.My, StoreLocation.CurrentUser);
string pfxFileName = Path.GetTempFileName();
File.WriteAllBytes(pfxFileName, RootCertificate.Export(X509ContentType.Pkcs12, PfxPassword));
//currentUser\Root, currentMachine\Personal & currentMachine\Root //currentUser\Root, currentMachine\Personal & currentMachine\Root
var info = new ProcessStartInfo() var info = new ProcessStartInfo()
{ {
......
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