ユーザ用ツール

サイト用ツール


サイドバー

このページの翻訳:



最近の更新



Tag Cloud

01_linux:02_www:31_centos5_tls

文書の過去の版を表示しています。


31 CentOS5 でTLS

CentOS5 の opensslが、openssl-0.9.8e-34.el5_11
これだとTLSに対応してないので、curlやwgetなどやると下記のエラーになってしまう。。。

error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

対応

新しいOpensslを入れてあげる

Openssl

wget https://www.openssl.org/source/openssl-1.0.2r.tar.gz
./config shared enable-ssl2 enable-ssl3 --prefix=/usr
make
make install
openssl version
echo '/usr/lib' > /etc/ld.so.conf.d/openssl.conf

Wget

1.16.1以上でtls1.1 tls1.2対応

wget http://ftp.gnu.org/gnu/wget/wget-1.16.tar.gz
yum -y remove wget
tar -xzvf wget-1.16.tar.gz
cd wget-1.16
./configure --with-ssl=openssl  --prefix=/usr
make && make install

Curl

# cd /usr/local/src
# wget https://curl.haxx.se/download/curl-7.58.0.tar.gz
# tar xzvf curl-7.58.0.tar.gz
# cd curl-7.58.0
# ./configure --enable-libcurl-option --with-ssl=/usr --prefix=/usr
$ curl -L -O [URL]

最後に

ライブラリ読み込み

# ldconfig
01_linux/02_www/31_centos5_tls.1556180746.txt.gz · 最終更新: 2019/04/25 17:25 by matsui