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

OpenSSL 1.1 support in .NET Core 2.1 #28079

Closed
omajid opened this issue Dec 6, 2018 · 14 comments
Closed

OpenSSL 1.1 support in .NET Core 2.1 #28079

omajid opened this issue Dec 6, 2018 · 14 comments

Comments

@omajid
Copy link
Member

omajid commented Dec 6, 2018

RHEL 8 does not include OpenSSL 1.0. It only includes OpenSSL 1.1. .NET Core 2.1 (the current LTS release) does not work on RHEL 8 because of this.

(.NET Core 3.0, which support both OpenSSL 1.0 and 1.1 should work just fine.)

@omajid
Copy link
Member Author

omajid commented Dec 6, 2018

I did a backport of the OpenSSL 1.1 to .NET Core 2.1 here: https://github.com/omajid/corefx/commits/openssl-1.1. It seems to work on RHEL 8, but I have not done extensive tests. This was based on dotnet/corefx#30807.

@stephentoub
Copy link
Member

cc: @bartonjs

@bartonjs
Copy link
Member

bartonjs commented Dec 6, 2018

dotnet/corefx#32006 and dotnet/corefx#32483 are what we'd backport (though we'd have to decide if we want to leave 1.1.x as preferred, or move it to fallback... wouldn't matter for RHEL since as a distro you should be building direct instead of portable).

It's something we've discussed internally, but the feeling was "definitely not before even a preview of 3.0 is out". That event is, of course, now in the past.

@bartonjs bartonjs self-assigned this Dec 6, 2018
@omajid
Copy link
Member Author

omajid commented Jan 2, 2019

Would it make sense to backport the OpenSSL 1.1 changes to both 2.2 and 2.1?

Also, would you prefer a focused backport? That is, we just essentially cherry-pick dotnet/corefx#32006 and dotnet/corefx#32483? Or would you prefer that we try and backport the additional changes that were made to master that dotnet/corefx#32006 depends on (aside from the C++ to C changes)? I think there's a few that dotnet/corefx#30807 links to.

@bartonjs
Copy link
Member

bartonjs commented Jan 2, 2019

The focused backport; just those two PRs cherry-picked (or, if it's across the C++ -> C transition, cherry-ported might be more appropriate).

If other things are required for structure reasons, then backporting those things seems better than inventing a new solution... but I guess that's a case-by-case thing. (I don't see much, aside from the C++ to C change)

@omajid
Copy link
Member Author

omajid commented Jan 2, 2019

I have found the following commits that are needed to make this port straight forward (almost mechanical). Let me know if any of them seem inappropriate for backporting:

After the hybridization, we might want these:

@bartonjs
Copy link
Member

bartonjs commented Jan 2, 2019

  • 30870 is dangerous, since it removes an export. Since the main benefit of it (aside from "numbers are better than strings") is "and BoringSSL also works", this should be avoided if possible.
  • 30869 similarly is more about being friendlier with BoringSSL; and removes exports. This should be avoided if possible.
  • 30889 is just about BoringSSL, and is just for a test, should not be backported.

In contrast:

  • 34222 should be backported, yeah 😄.

Removing exports, and depending on new exports, has some complexity cases around the execution and deployment models, so they should really be avoided in servicing. Changing the managed code to no longer call exports is fine, but they should just hang around as unused code.

@MichaelSimons
Copy link
Member

MichaelSimons commented Feb 5, 2019

It appears this is also affecting Alpine3.9 as well which was recently released and supports libssl1.1. The 2.1 support matrix includes Alpine 3.7+.

No usable version of the libssl was found

@omajid
Copy link
Member Author

omajid commented Feb 5, 2019

@MichaelSimons dotnet/corefx#34443 should fix this. Is there any way you can try out that PR on alpine 3.9 to verify that it works?

@bluca
Copy link

bluca commented Feb 22, 2019

This is also a problem on Debian 10, which likewise doesn't ship libssl 1.0 anymore, so vsts universal package downloads do not work as ArtifactTool uses System.Security.Cryptography.Native.OpenSsl.so.

Any ETA on when a new build of the 2.1.x core libraries will be available with this fix?

Thanks!

@omajid
Copy link
Member Author

omajid commented Feb 22, 2019

dotnet/corefx#34443 has the 2.1.9 label. So it should get included starting with that release. I don't know when that gets released. Looking at the release history, probably within a few months? I have had decent success building .NET Core from source (using https://github.com/dotnet/source-build/) with dotnet/corefx#34443 applied locally. This is what I am doing on RHEL 8 at the moment.

@bluca
Copy link

bluca commented Feb 22, 2019

Thanks, yes I've managed to build it locally as well, and dropping the updated shared library in vsts' directory works.

@omajid
Copy link
Member Author

omajid commented Mar 22, 2019

@bartonjs, should we close this issue now?

@bartonjs
Copy link
Member

@omajid Yep, good call 😄

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 2.1.x milestone Feb 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 14, 2020
@bartonjs bartonjs removed their assignment Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants