Ⅰ. はじめに
タイトルの通り「OpenSSLのセキュリティレベルを変更する方法」です。
以下のようなエラーが出力された場合に本記事内容を実行すると解決します。
cURL error 35: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small
58: could not load PEM client certificate, OpenSSL error error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak, (no key found, wrong pass phrase, or wrong file format?)
(証明書の署名アルゴリズムを変更する事も検討すべきです)
Ⅱ. 手順
1. openssl.cnfを編集する
vim /etc/ssl/openssl.cnf
# 一行目に以下を追加 openssl_conf = openssl_init # ファイル末尾に以下を追加 [openssl_init] ssl_conf = ssl_sect [ssl_sect] system_default = system_default_sect [system_default_sect] CipherString = DEFAULT@SECLEVEL=1
2. OSを再起動する
reboot -f