private static void disableSSLVerification() { if (Program.Settings.DisableSSLVerification) { try { GitTools.DisableSSLVerification(); Program.Settings.DisableSSLVerification = false; } catch (GitTools.SSLVerificationDisableException ex) { ExceptionHandlers.Handle("Cannot disable SSL verification", ex); } } }
///<summary> /// Handle exceptions caused by SSL certificate problem /// Throw InteractiveUpdaterException on unrecoverable errors. ///</summary> private bool handleSSLCertificateProblem() { if (!isGlobalSSLFixAllowed()) { Trace.TraceInformation("[GitInteractiveUpdater] User rejected to disable SSl certificate verification"); return(false); } Trace.TraceInformation("[GitInteractiveUpdater] User agreed to disable SSl certificate verification"); try { GitTools.DisableSSLVerification(); } catch (GitTools.SSLVerificationDisableException ex) { throw new LocalCommitStorageUpdaterFailedException("Cannot change global http.verifySSL setting", ex); } Trace.TraceInformation("[GitInteractiveUpdater] SSL certificate verification disabled"); return(true); }