Xử lý lỗi trên ubuntu dh key too small

Khi gọi http request trên ubuntu, ở đây là ubuntu 20 thì hay gặp lỗi
curl: (35) error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small
(các ngôn ngữ khác như java, python báo lỗi tương tự)
Cách fix:
Sửa file /etc/ssl/openssl.cnf
Thêm vào đầu file

openssl_conf = default_conf

Thêm vào cuối file

[default_conf]

ssl_conf = ssl_sect



[ssl_sect]

system_default = system_default_sect



[system_default_sect]

CipherString = DEFAULT:@SECLEVEL=1



Thế là xong