[DOCKER] "Dh key too small" appears when connecting to https on Ubuntu

Overview

When I try to connect to https with Ubuntu installed on docker, I get a "dh key too small" error and cannot connect.

Cause

Since the security version of the server is old, increase the security level on the server side or decrease it on the client side.

Solution

Since it only touches the client side, fix the following (lower the security level).

/usr/lib/ssl/openssl.cnf


#Added to the first line
openssl_conf = default_conf

...
...
...

#Add to last line
[ default_conf ]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
MinProtocol = TLSv1.2
CipherString = DEFAULT:@SECLEVEL=1

It can be used without reloading.

Recommended Posts

"Dh key too small" appears when connecting to https on Ubuntu
BasicDataSourceFactory is ClassNotFoundException when connecting to DB on Tomcat 8
The key to running Docker on Raspberry Pi 4 (Ubuntu server 20.04)
A note when I was addicted to converting Ubuntu on WSL1 to WSL2
How to use Bio-Formats on Ubuntu 20.04
How to install WildFly on Ubuntu 18.04
Preparing to use electron-react-boilerplate on Ubuntu 20.4
How to build vim on Ubuntu 20.04
What to do when Blocked Host: "host name" appears in Ruby on Rails
Email sending error "dh key too small" in Redmine's official Docker Image
What to do when "call'Hoge.connection' to establish a connection" appears on rails c