You said:
The issue does not exist in the tagged upstream wine-7.9 release.
Which is a bit interesting. That switch statement does exist upstream: https://source.winehq.org/git/wine.git/blob/wine-7.9:/dlls/secur32/schannel.c#l336 and has existed since 2006. I wonder what is different between Proton and upstream?
Thanks for the report, I'll ask our QA to reproduce the S&box issue and have a dev take a look.
After some more testing, it turns out that if you switch the version in the prefix once, this issue is fixed for good - even switching back to win10 won't bring it back, so this is only reproducible on a completely fresh prefix as created by Proton.
This makes me think that this is an issue with defaults/the patches that were introduced to make Windows 10 the default version in loader/wine.inf.in.
Thanks for passing it on!
This seems to be fixed in the latest Proton Experimental, thank you very much.
proton experimentalx2 2022-060x80090304x1 2022-05
A change in Proton currently causes SEC_E_INTERNAL_ERROR in AcquireCredentialsHandleW while calling get_cred when attempting any SSL connection via the built-in
HttpClientclass in .NET 5+ applications while the OS version is set towin10.It calls get_cred with a version of 5, while SCHANNEL_CRED_VERSION is defined as 4 globally. This causes a fail-fast in the linked switch case.
With
win10OS version:With
win7OS version:Manually switching the version to
win7via winecfg or protontricks is enough to solve the issue.Curiously, SCHANNEL_CRED_VERSION is defined as 4 in the .NET sources as well and I can't spot any place where this is changed. Note that
dwFlagsis also zero'd out in the win10 example.Reproduction
I have created a small reproduction program that you can build with
cd NetHttpsTest && dotnet publishif you have the dotnet 6 SDK installed. The resulting files inNetHttpsTest\bin\Debug\net6.0\win-x64\publishwill be self-contained Windows binaries that do not need a runtime in the wineprefix. You don't need a Windows machine to do this. In my testing, any HTTPS URL seems to cause the issue, e.g.https://google.com. I've tested this in the current Proton Experimental.NetHttpsTest.zip (prebuilt)
You should see this stack trace when the connection fails:
The issue does not exist in the tagged upstream wine-7.9 release. It currently affects a modding toolkit I am maintaining, which is injected into a game, but I'm aware of at least one Steam game that is affected by this issue as well: https://github.com/ValveSoftware/Proton/issues/4940#issuecomment-1059781132
If I can do anything to help with troubleshooting this, or if this is better reported elsewhere, please let me know.