-
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
openssl 3.0 support #46526
Comments
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq Issue DetailsIn continuation to PowerShell/PowerShell#14410 PowerShell-7.0.3$ grep -Rns "ERR_put_error" ./ System.Security.Cryptography.Native.OpenSsl.so contains deprecated APIs of Openssl 3.0 This bug is created for support of openssl 3.0 in dotnet
|
I thought we already had an issue tracking this, but apparently it was just on my implicit TODO. So now this is the issue tracking working with OpenSSL 3. (Which we may have to service... at least, I think we did for 1.0/1.1 hybridization) |
@bartonjs I just found that we simply had a note card on our project board for it (hence you thinking we had something tracking it). I've updated the board to use this issue instead of the note card. |
Fedora 34, tracked via dotnet/core#5851, will have OpenSSL 3.0: https://fedoraproject.org/wiki/Changes/OpenSSL3.0, though there are plans for a OpenSSL 1.1 package for compatibility. |
Sorry for accidently closed the issue. |
Hey folks! Is there some feature branch or personal repo that I can try out to see what the latest status of this implementation is? I was trying out building runtime with (a pre-release of) OpenSSL 3.0 today and I get a couple of pages worth of build errors. I would like to help out with the port/testing if possible. |
@omajid I have a tinkering branch at https://github.com/bartonjs/runtime/tree/support_openssl3 My recollection is that bartonjs@459d274#diff-9f438d89e563743defcabf3a647a5be42683be66ad8d381683c9967d85d4f214 was the only part required to compile against 3.0, but since I commented out a static assert and haven't written code to deal with it yet there are obviously runtime errors expected. Moving asymmetric operations off of primitives and onto EVP_PKEY got too big, so I pulled that off as its own thing, but I keep getting distracted by other things. |
Thanks! Unfortunately, that doesn't seem to address the compiler errors I am seeing. Building runtime's The first few errors seem to be fixed by something like this in +#if OPENSSL_VERSION_NUMBER >= OPENSSL_VERSION_3_0_0_RTM
+
+// Remove problematic #defines
+#undef CRYPTO_num_locks
+#undef ERR_load_crypto_strings
+#undef OPENSSL_add_all_algorithms_conf
+#undef SSL_load_error_strings
+#undef SSL_library_init
+#undef CRYPTO_set_locking_callback
+
+#endif I will keep working away at this. |
Hmmm.. I probably only tried building non-portable when building against 3.0 |
Thanks, non-portable worked for me too using |
Not sure what your schedule or the scope of this implementation change looks like, but I wonder if it we should get runtime building/running against OpenSSL 3.0 first (even if that means using deprecated (but not removed) primitives) and then look at moving to |
.NET 6 |
I am interested in getting this support merged into 3.1 as well. I have a draft PR here: dotnet/corefx#43078 |
@omajid Can you describe the need for supporting OpenSSL 3.0 in 3.1? 6.0 will come out in ~November, and then 3.1 will go out of support about a year later. At minimum, I don't think we'd accept the PR into release/3.1 while OpenSSL 3.0 is still calling their builds alpha, so it's unclear how much time this would grant if the problem space is just ".NET LTS using OpenSSL 3". It's also worth noting that I'm/we're not done with the OpenSSL 3.0 project... we want to get the rest of the runtime onto EVP_PKEY and off of the primitives to avoid dependencies on now-deprecated API. |
Happy to! I am interested in this because a couple of Linux distributions that I care about will be moving to OpenSSL 3.0 soon. Fedora is planning to use it as soon as 3.0 is declared GA. https://fedoraproject.org/wiki/Changes/OpenSSL3.0 was initially for Fedora 34, but got pushed to Fedora 35 due to OpenSSL upstream being late. There is a plan to have a compatibility package but I am not sure how long that will be supported or if it would be usable for building. It's also looking like RHEL 9 will include (only?) OpenSSL 3.0: https://bugzilla.redhat.com/show_bug.cgi?id=1955873
Yeah, that's completely fair. I was motivated by the distros above and figured it's better to share my work than keep it to myself.
True. Maybe the better move for these distributions would be waiting for the next LTS (6.0) and not shipping/supporting .NET Core 3.1?
Thanks! I didn't realize that - even though I now see that this issue is still open. I built portable and non portable builds against OpenSSL 3.0 alpha 15 and assumed this was fully completed. |
$ grep -r "EVP_MD_size" . EVP_MD_size API seems to be causing an issue for powershell build. As per https://www.openssl.org/docs/manmaster/man3/EVP_MD_size.html, this function is renamed in openssl 3.0.0 Error observed with https://dotnet.microsoft.com/download/dotnet/6.0, https://github.com/PowerShell/PowerShell/releases/tag/v7.2.0-preview.7 and openssl 3.0.0 beta1: Welcome to .NET 6.0!^M Telemetry^M ----------------^M
|
Looks like EVP_MD_size got renamed to EVP_MD_get_size for Beta1, and our support was based on Alpha....14? So we'll need to do another sweep. |
.NET 6 Preview 7 will work with OpenSSL 3.0 Beta 1. Hopefully there aren't any more renames now that they got to Beta 😄. |
Thanks for the update. When will be the preview 7, i didnt find it yet at https://dotnet.microsoft.com/download/dotnet/6.0 ? |
Preview 7 will come out in about a month. (Preview 6 came out two days ago) |
Moving the issue to 7.0 to track that we still have some plumbing/infrastructure work to do to get off of deprecated APIs. While doing the 6.0 will still ship with OSSL3 support, it's just not as clean as I'd like. |
My Razor server fails to start on Fedora 36 and VsCode, with error message
I should have openssl1.1 installed, is there any way I can fix it? |
Hey, @adamijak do you have a set of steps I can follow to reproduce the issue you are seeing? I ran the following steps and I couldn't see a problem:
Are you seeing errors running via |
Hi I opened separate issue #67375 for this |
@bartonjs Do you have any objections to us punting this out of .NET 8 (into Future for the time-being), and revisiting the remaining work as a candidate for .NET 9 planning? |
In continuation to PowerShell/PowerShell#14410
PowerShell-7.0.3$ grep -Rns "ERR_put_error" ./
Binary file ./src/powershell-unix/bin/Linux/netcoreapp3.1/linux-x64/System.Security.Cryptography.Native.OpenSsl.a matches
Binary file ./src/powershell-unix/bin/Linux/netcoreapp3.1/linux-x64/System.Security.Cryptography.Native.OpenSsl.so matches
Binary file ./bin/System.Security.Cryptography.Native.OpenSsl.a matches
Binary file ./bin/System.Security.Cryptography.Native.OpenSsl.so matches
System.Security.Cryptography.Native.OpenSsl.so contains deprecated APIs of Openssl 3.0
Reference: https://www.openssl.org/news/changelog.html
This bug is created for support of openssl 3.0 in dotnet
Project Plan (updated as data is known, checkmarks mean done locally, not necessarily merged)
The text was updated successfully, but these errors were encountered: