Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Use .NET Core 1.1 SDK, remove linux val_cert restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
dtillman committed Nov 29, 2016
1 parent c7ce184 commit bf21498
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 28 deletions.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003131"
"version": "1.0.0-preview2-1-003177"
}
}
18 changes: 9 additions & 9 deletions src/Steeltoe.Discovery.Client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"netstandard1.3": {
"dependencies": {
"System.Collections": "4.0.11",
"System.Net.NameResolution": "4.0.0"
"System.Collections": "4.3.0",
"System.Net.NameResolution": "4.3.0"
},
"imports": [
"portable-net451+win8"
Expand All @@ -34,12 +34,12 @@
},
"dependencies": {
"Steeltoe.Discovery.Eureka.Client": "1.0.0-*",
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "1.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0",
"Microsoft.Extensions.Options": "1.0.0",
"Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Binder": "1.0.0"
"Microsoft.Extensions.Logging.Abstractions": "1.1.0",
"Microsoft.Extensions.Configuration.Abstractions": "1.1.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.1.0",
"Microsoft.Extensions.Options": "1.1.0",
"Microsoft.AspNetCore.Hosting.Abstractions": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
"Microsoft.Extensions.Configuration.Binder": "1.1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
using Microsoft.Extensions.Logging;
using System.Net.Security;
using System.Net;
using System.Runtime.InteropServices;

namespace Steeltoe.Discovery.Eureka.Transport
{
Expand Down Expand Up @@ -593,13 +592,11 @@ protected virtual HttpClient GetHttpClient(IEurekaClientConfig config)
#if NET451
client = new HttpClient();
#else
// TODO: For coreclr, disabling certificate validation only works on windows platform
// https://github.com/dotnet/corefx/issues/4476
if (config != null && !config.ValidateCertificates && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (config != null && !config.ValidateCertificates)
{
var handler = new WinHttpHandler();
handler.ServerCertificateValidationCallback = (sender, cert, chain, sslPolicyErrors) => true;
return new HttpClient(handler);
var handler = new HttpClientHandler();
handler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true;
client = new HttpClient(handler);
} else
{
client = new HttpClient();
Expand Down
19 changes: 8 additions & 11 deletions src/Steeltoe.Discovery.Eureka.Client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,25 @@
}
},
"dependencies": {
"System.Net.Http": "4.0.0"
}
},
"netstandard1.3": {
"dependencies": {
"System.Collections": "4.0.11",
"System.Linq": "4.1.0",
"System.Threading": "4.0.11",
"System.Net.NameResolution": "4.0.0",
"System.Threading.Timer": "4.0.1",
"System.Net.Http.WinHttpHandler": "4.0.0",
"System.Runtime": "4.1.0",
"System.Net.Http": "4.1.0"
"System.Collections": "4.3.0",
"System.Linq": "4.3.0",
"System.Threading": "4.3.0",
"System.Net.NameResolution": "4.3.0",
"System.Threading.Timer": "4.3.0",
"System.Runtime": "4.3.0"
},
"imports": [
"portable-net451+win8"
]
}
},
"dependencies": {
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0",
"System.Net.Http": "4.3.0",
"Newtonsoft.Json": "9.0.1",
"Microsoft.Extensions.Logging.Abstractions": "1.0.0"
"Microsoft.Extensions.Logging.Abstractions": "1.1.0"
}
}

0 comments on commit bf21498

Please sign in to comment.