Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow certificates for SSL to be accepted. #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ScottIsAFool
Copy link
Member

@ScottIsAFool ScottIsAFool commented Mar 14, 2017

Hopefully addressing #580

@ScottIsAFool ScottIsAFool changed the title [WIP] Allow certificates for SSL to be accepted. Allow certificates for SSL to be accepted. Mar 14, 2017
@@ -268,6 +268,7 @@ public static HttpWebRequest CreateHttpWebRequest(string requestUri, bool allowA
request.UserAgent = ApplicationEnvironment.UserAgent;

ApplyProxyOverride(request);
ServicePointManager.ServerCertificateValidationCallback = AcceptAllCerts;
Copy link

@aviade aviade Jul 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why override the static ServerCertificateValidationCallback every time that we create request? If ignoring invalid/unsafe certs is by design why not do it in the static constructor?

Also - this will override the cert validation callback that we do it the static constructor
if (ApplicationDiagnostics.AllowUnsafeCertificates)
{
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants