dotnet / dotnet/runtime

OpenSSL DES should be optional

Open
#122,777 5 comments 0 reactions 0 assignees View on GitHub
area-System.Security
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

### Description

I've built a stripped-down and hardened version of OpenSSL 3.5.4 (latest LTS). Most OpenSSL "config" options work fine by disabling algorithms that I don't need/want with 'no-xxx'. Except 'no-des'. When .NET loads the library, it insists on importing `EVP_des_cbc` (and possibly other functions).

### Reproduction Steps

on Linux:
clone OpenSSL 3.5.4
config no-des
make
start any .NET program that requires OpenSSL
-> Fails with "no suitable OpenSSL found" (`EVP_des_cbc`)

### Expected behavior

Much like the modern ML-DSA and ML-KEM algorithms I would expect .NET to use OpenSSL with the features it has and just report `PlatformNotSupported` only for classes that actually won't work. This is the case for `System.Security.Cryptography.MLDsa` etc. It would be nice if it was also the case for `System.Security.Cryptography.DES`, which itself is documented to be "legacy".

### Actual behavior

.NET cannot use OpenSSL at all if it is built without DES support, even if DES classes are never used by the .NET program.

### Regression?

_No response_

### Known Workarounds

_No response_

### Configuration

.NET 10.0.1 SDK
Linux (Ubuntu 24.04)
x64
private OpenSSL build

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.