韌館-LearnHouse

啟動apache卻出現ee key too small?

由於N年前透過ubuntu 16.04.6架設的server,如今要轉換到最新的ubuntu 20.04.2
雖然都是原封config搬過來,但在啟動apache卻出現錯誤,透過log得知以下訊息:

[Mon May 03 02:59:16.948343 2021] [ssl:emerg] [pid 81202:tid 140418032479296] SSL Library Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small


原來是因為已強制要使用2048bit的長度來製作憑證,但由於某種原因不能更改現有的憑證,因此可以透過以下方式暫時允許,但建議未來還是要更換成較安全的方式。
在/etc/ssl/openssl.cnf的最開頭加入

openssl_conf = default_conf

然後在openssl.cnf的最底部加入

[ default_conf ]

ssl_conf = ssl_sect

[ssl_sect]

system_default = system_default_sect

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

這麼一來,除了ee key too small,以下的錯誤都能解決:

dh key too small
ee key too small
ca md too weak

2021年5 月 posted by admin in Linux and have No Comments

Place your comment

Please fill your data and comment below.
名稱:
信箱:
網站:
您的評論: