Skip to content

openssl 3.0 support #46526

Open
Open

Description

@satya-rajesh

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)

  • Convert RSA shim from RSA* to EVP_PKEY*
    • Keygen
    • Sign
    • Verify
    • Encrypt
    • Decrypt
    • Import
    • Export
  • Rebuild the interop exception model.
    • Each operation should reset the error queue, and we want to throw the first error, not the last one.
  • Convert ECDSA shim to fully EVP_PKEY*
  • Convert ECDH shim to fully EVP_PKEY*
  • Convert DSA shim to fully EVP_PKEY*
  • Write translation table for X509ChainStatusCodes (some #define values changed in OpenSSL 3.0)

Activity

  1. added
    untriaged
    on Jan 4, 2021
  2. bartonjs commented on Jan 5, 2021

    @bartonjs
    Member

    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)

  3. removed
    untriaged
    on Jan 5, 2021
  4. added this to the 6.0.0 milestone on Jan 5, 2021
  5. self-assigned this
    on Jan 7, 2021
  6. added
    enhancement
    os-linux
    on Jan 7, 2021
  7. jeffhandley commented on Jan 13, 2021

    @jeffhandley
    Member

    @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.

  8. added
    Priority:2
    on Jan 14, 2021
  9. self-assigned this
    on Jan 14, 2021
  10. added
    Cost:L
    on Jan 15, 2021
  11. omajid commented on Jan 19, 2021

    @omajid
    Member

    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.

  12. 30 remaining items

  13. satya-rajesh commented on Jul 16, 2021

    @satya-rajesh
    Author

    .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 ?

  14. bartonjs commented on Jul 16, 2021

    @bartonjs
    Member

    Preview 7 will come out in about a month. (Preview 6 came out two days ago)

  15. modified the milestones: 6.0.0, 7.0.0 on Jul 19, 2021
  16. bartonjs commented on Jul 19, 2021

    @bartonjs
    Member

    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 DSA* => EVP_PKEY* change the tests revealed that we probably want to clean up how we interact with the error queue (#55973), which is too concerning to do with the limited available time in 6.0.

    6.0 will still ship with OSSL3 support, it's just not as clean as I'd like.

  17. adamijak commented on Mar 31, 2022

    @adamijak

    My Razor server fails to start on Fedora 36 and VsCode, with error message Cannot get required symbol EVP_MD_size from libssl

    > dotnet --list-sdks
    3.1.417 [/usr/lib64/dotnet/sdk]
    6.0.103 [/usr/lib64/dotnet/sdk]
    
    > openssl version
    OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
    

    I should have openssl1.1 installed, is there any way I can fix it?

  18. omajid commented on Mar 31, 2022

    @omajid
    Member

    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:

    podman run -it registry.fedoraproject.org/fedora:36 /bin/bash
    dnf install dotnet-sdk-3.1 dotnet-sdk-6.0 openssl1.1
    mkdir -p foobar
    cd foobar
    dotnet new razor
    dotnet run
    

    Are you seeing errors running via dotnet run? Or is it the vscode instance the one showing errors? Does the error say anything about OmniSharp? Can you share the error messages (preferably the complete set of logs and/or stack trace) here?

  19. adamijak commented on Mar 31, 2022

    @adamijak

    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:

    podman run -it registry.fedoraproject.org/fedora:36 /bin/bash
    dnf install dotnet-sdk-3.1 dotnet-sdk-6.0 openssl1.1
    mkdir -p foobar
    cd foobar
    dotnet new razor
    dotnet run
    

    Are you seeing errors running via dotnet run? Or is it the vscode instance the one showing errors? Does the error say anything about OmniSharp? Can you share the error messages (preferably the complete set of logs and/or stack trace) here?

    Hi I opened separate issue #67375 for this

  20. modified the milestones: 7.0.0, 8.0.0 on Jul 6, 2022
  21. jeffhandley commented on Mar 16, 2023

    @jeffhandley
    Member

    @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?

  22. modified the milestones: 8.0.0, Future on Mar 22, 2023
  23. JAicewizard commented on Oct 21, 2025

    @JAicewizard

    Note that openssl 1.1 is EOL at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Cost:LPriority:2area-System.Securityenhancementos-linux

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions