-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
The handler does not support client authentication certificates with this combination of libcurl (7.54.0) and its SSL backend ("LibreSSL/2.0.20") #24989
Comments
This is a known limitation of our current stack. The only workaround is to use OpenSSL/1.0-backed libcurl. |
cc @wfurt for Mac instructions to get the right libcurl. |
no, that won't work either @karelz this is essentially dup of https://github.com/dotnet/corefx/issues/26446 and https://github.com/dotnet/corefx/issues/19718 will fix this. |
hmmmm..... is there any workaround for that? basically, I have a bunch of APIs to call and I need to use certificates. It'd be awesome to hack this and make it work in my local environment.
I have also tried the suggestion from Stephan in https://github.com/dotnet/corefx/issues/9728#issuecomment-234418291 However, it didn't work Any workarounds and thoughts would be welcome |
I've upgraded my curl and now it's: curl --version
Error after updating curl: I managed to change the curl version to be 7.58, but .NET Core 2 is still using 7.54. Is there any way to my current .NET Core installation to use the new version of LibCurl and OpenSSL? Why is it getting the old version of curl? |
@mayconbeserra I suspect you're not getting libcurl 7.58 on your loader path. I'm able to get it with e.g. That doesn't fix the issue, though:
|
I did more digging and unfortunately the story is currently weird. If you need to just skip client certificates on your dev environment (Mac) for developer-only! purposes, then you can use Please let me know if the first dev-only workaround works for you. |
@mayconbeserra can you please paste a code showing what exactly doesn't work with .NET Core 2.1 official timeline is here: https://github.com/dotnet/core/blob/master/roadmap.md#upcoming-ship-dates |
@karelz the code is:
is that correct? |
Just to clarify: Your server requires client certificate to be sent? (the ServerCertificateCustomValidationCallback will only take care of ignoring server certificate) |
.NET Core 2.1 RC1 has been released. It is suitable for use in production environments. The default HTTP stack is no longer based on Curl (for Linux). It will use the new managed implementation (SocketsHttpHandler). See: If you use .NET Core 2.1, then your problem with client certificates should be solved. Closing this issue. Let us know if you have other problems after upgrading to 2.1. If so, please open a new issue for |
upgraded to RC1, sadly I am having the same issue.
|
@detaybey, either you're not actually using rc1, or you've explicitly opted via an environment variable or app context switch to not use the default handler, as that error message is only possible when opting out of the default. |
@detaybey Console.WriteLine($"(Framework: {Path.GetDirectoryName(typeof(object).Assembly.Location)})"); |
Got the same thing:
I added the path.GetDirectoryName and it shows
One note: This code was compiled on a PC and ssh'ed to the mac. |
This means that your app is still using .NET Core 2.0 and not .NET Core 2.1. And that means that the CurlHandler HTTP stack is still being used...which is why you continue to see the error. It looks like you did install .NET Core 2.1-RC1. Your machine now has both .NET Core 2.0.x and .NET Core 2.1-RC1 installed. So, I think this means that you need to re-target your app by modifying your .CSPROJ file so that it will compile and target .NET Core 2.1. Can you please share your .CSPROJ file? It will need to change in order to target .NET Core 2.1. |
I resolved the issue on my Mac by installing the latest version of the .Net Core 2.1.0-300-rc1 package. At first I tried to use the -200 version but that somehow did not let me change the TargetFramework in my .csproj files to netcoreapp2.1 as it always said that 2.1 is not a supported target framework. Installing the RC of -300 fixed that issue for me and after I changed my csproj file to target 2.1 like this, the handler error got resolved.
Do not forget to also change the versions of your package references accordingly like for example:
|
For now, we're just doing everything from the cmdline with dotnet.exe on windows 10. These are our steps:
We see these errors at the end of the process.
When we do a dotnet --info we get this
I'm attaching the output from the run command. Many thanks for your help!!!!! |
2.1.4 is version number of SDK/tooling. Framework/runtime version is 2.0.7 or 2.1-rc (or something like that). |
Ok, I removed TargetFrameworkVersion from the csproj I run "dotnet run testfor21.csproj" case 1:
case 2:
case 3: I get this line twice:
@karelz - if you have time, please be specific in your response as to what i should try! :) |
The version of the SDK you have doesn't actually have .NET Core 2.1 in it. That is why you are getting this error message:
Unfortunately, this is confusing because the SDK version shows "2.1.x" but it isn't actually .NET Core 2.1. We hope to fix the version naming of the SDK tools relative to the .NET Core runtime versions in a future release of the SDK. Please install the lastest .NET Core 2.1 which is .NET Core 2.1 RC: Then when you do "dotnet --info", you should see something like this:
|
And further down in the output, it will list all the .NET Core runtimes you have installed, i.e. on my dev machine. You can see down in the list that .NET Core 2.1. RC1 runtime is installed.
|
David, It worked! Thanks for the help. Note to others: I put this in the global.json
and this in the csproj
I'm now going to try the same in Visual Studio. |
Yep worked for me, I just closed VS2017 on the Mac, downloaded dotnet core 2.1: https://www.microsoft.com/net/download/thank-you/dotnet-sdk-2.1.302-macos-x64-installer Opened up VS and the project, repointed to 2.1 (project options -> general) and it worked as expected. Thanks guys. |
I am seeing this error when targeting |
…6.0 on Mac OS. - Removed netstandard2.0 from target frameworks. We will have two packages. Cohesity.PowerShell and Cohesity.PowerShell.Core that will be deployed to PowerShell Gallery. - Cleaned up project files - Using DangerousAcceptAnyServerCertificateValidator to ignore self-signed certificates so that we can run with PowerShell Core 6.0 on Mac OS X. Using this doesn't require dotnet2.1 or PowerShell 6.1 preview. https://github.com/dotnet/corefx/issues/27000
It's not about what netstandard version you're using, but what implementation you're actually running on. netstandard is just about the surface area you're targeting. Presumably you're seeing this when running on .NET Core 2.0 on a mac; if you instead run on .NET Core 2.1, it should go away. |
I'm having an issue when calling an endpoint with the following code, and I don't know what can solve that critical issue on mac:
The error is below:
curl --version
dotnet info
The text was updated successfully, but these errors were encountered: