.net core 3.0 3.1 在docker 下报SSL Handshake failed with OpenSSL error

Reference Address: https://github.com/dotnet/corefx/issues/40538

 

According to https://www.ssllabs.com/ssltest/analyze.html?d=api-fxpractice.oanda.com their key exchanges are preferring DHE-1024 over ECDHE. Using the guidance from NIST SP 800-57, a 1024-bit DHE key has 80 bits of security (or smaller).

Debian Buster has raised the OpenSSL TLS security level to 2 (https://www.debian.org/releases/stable/i386/release-notes/ch-information.en.html#openssl-defaults), which requires DHE at 2048-bit or higher (112 bits of security).

Theoretically, editing /etc/ssl/openssl.cnf and setting CipherString = DEFAULT:@SECLEVEL=1 will change the security level back to 1.

 

Debian seems, is to improve the level of security, but my application in .net core 2.2 is not reported this error.

Solution is to add the command in dockerfile

RUN sed -i "s|DEFAULT@SECLEVEL=2|DEFAULT@SECLEVEL=1|g" /etc/ssl/openssl.cnf

Guess you like

Origin www.cnblogs.com/jidanfan/p/12158972.html