このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
01_linux:02_www:31_centos5_tls [2019/10/29 02:31] – [Wget] matsui | 01_linux:02_www:31_centos5_tls [2021/04/16 01:38] (現在) – matsui | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== 31 CentOS5 でTLS ====== | + | ====== 31 CentOS5 でTLS1.2 |
CentOS5 の opensslが、openssl-0.9.8e-34.el5_11 | CentOS5 の opensslが、openssl-0.9.8e-34.el5_11 | ||
- | これだとTLSに対応してないので、curlやwgetなどやると下記のエラーになってしまう。。。 | + | これだとTLS1.2に対応してないので、curlやwgetなどやると下記のエラーになってしまう。。。 |
error: | error: | ||
行 17: | 行 17: | ||
新しいOpensslを入れてあげる | 新しいOpensslを入れてあげる | ||
+ | |||
+ | |||
+ | < | ||
+ | # yum install gcc gnutls-devel | ||
+ | </ | ||
==== Openssl ==== | ==== Openssl ==== | ||
< | < | ||
- | wget https:// | + | # wget https:// |
- | tar zxvf openssl-1.0.2r.tar.gz | + | # tar zxvf openssl-1.0.2r.tar.gz |
- | cd openssl-1.0.2r | + | # cd openssl-1.0.2r |
- | ./config shared enable-ssl2 enable-ssl3 --prefix=/ | + | # ./config shared enable-ssl2 enable-ssl3 --prefix=/ |
- | make | + | # make |
- | make install | + | # make install |
- | / | + | # / |
OpenSSL 1.0.2r | OpenSSL 1.0.2r | ||
- | echo '/ | + | </ |
+ | |||
+ | === Pathを通す === | ||
+ | < | ||
+ | # mv / | ||
+ | # ln -s / | ||
+ | # echo '/ | ||
+ | </ | ||
+ | |||
+ | === ライブラリ読み込み === | ||
+ | |||
+ | < | ||
+ | # ldconfig | ||
</ | </ | ||
行 36: | 行 53: | ||
1.16.1以上でtls1.1 tls1.2対応 | 1.16.1以上でtls1.1 tls1.2対応 | ||
< | < | ||
- | wget http:// | + | # wget http:// |
- | tar -xzvf wget-1.16.1.tar.gz | + | # tar -xzvf wget-1.16.1.tar.gz |
- | cd wget-1.16.1 | + | # cd wget-1.16.1 |
- | ./configure --with-ssl=openssl | + | # export PKG_CONFIG_PATH=/ |
- | make && make install | + | ※これを実行してないと古いopensslのpkgconfgを読んでしまう。 |
+ | |||
+ | # ./configure --with-ssl=openssl | ||
+ | # make && make install | ||
</ | </ | ||
+ | === ライブラリの確認 === | ||
+ | |||
+ | libssl.so.1.0.0 => / | ||
+ | < | ||
+ | # ldd / | ||
+ | linux-vdso.so.1 => (0x00007fff5cdfd000) | ||
+ | libuuid.so.1 => / | ||
+ | libssl.so.1.0.0 => / | ||
+ | libcrypto.so.1.0.0 => / | ||
+ | libz.so.1 => / | ||
+ | libidn.so.11 => / | ||
+ | librt.so.1 => / | ||
+ | libc.so.6 => / | ||
+ | / | ||
+ | libdl.so.2 => / | ||
+ | libpthread.so.0 => / | ||
+ | </ | ||
=== CA証明書を指定しておく === | === CA証明書を指定しておく === | ||
行 49: | 行 86: | ||
< | < | ||
- | echo ' | + | # / |
+ | # mv / | ||
+ | # mv cacert.pem / | ||
+ | |||
+ | # echo ' | ||
</ | </ | ||
行 67: | 行 108: | ||
# cd curl-7.58.0 | # cd curl-7.58.0 | ||
# ./configure --enable-libcurl-option --with-ssl=/ | # ./configure --enable-libcurl-option --with-ssl=/ | ||
- | $ curl -L -O [URL] | + | # make |
+ | # make install | ||
+ | # /opt/curl-7.58.0/ | ||
+ | curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/ | ||
+ | Release-Date: | ||
</ | </ | ||
行 77: | 行 122: | ||
# mv / | # mv / | ||
# ln -s / | # ln -s / | ||
+ | $ curl -L -O [URL] | ||
</ | </ | ||
- | ==== 最後に ==== | ||
- | ライブラリ読み込み | ||
- | < | ||
- | # ldconfig | ||
- | </ | ||
- | {{tag> | + | {{tag> |