Skip to content

Commit f573c33

Browse files
committed
Implemented ServerCertificateCustomValidationCallback for RTM Libs.
1 parent 57df252 commit f573c33

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Exceptionless/Submission/DefaultSubmissionClient.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ public void SendHeartbeat(string sessionIdOrUserId, bool closeSession, Exception
121121
}
122122

123123
private HttpClient CreateHttpClient(string userAgent) {
124-
#if !NET45
125-
var handler = new HttpClientHandler { UseDefaultCredentials = true };
126-
127-
// TODO: This will be supported in the next update for all platforms: https://github.com/dotnet/corefx/commit/97c940eec1f6afe3e4af31e72d79c3a11e7b1ff1
128-
//handler.ServerCertificateCustomValidationCallback = delegate { return true; };
129-
#else
124+
#if NET45
130125
var handler = new WebRequestHandler { UseDefaultCredentials = true };
131126
handler.ServerCertificateValidationCallback = delegate { return true; };
127+
#else
128+
var handler = new HttpClientHandler { UseDefaultCredentials = true };
129+
#if !PORTABLE && !NETSTANDARD1_2
130+
handler.ServerCertificateCustomValidationCallback = delegate { return true; };
131+
#endif
132132
#endif
133133

134134
if (handler.SupportsAutomaticDecompression)

0 commit comments

Comments
 (0)