LoginSignup
68
62

More than 5 years have passed since last update.

CentOS7にOpenSSL1.1.1をインストール

Last updated at Posted at 2019-04-17

概要

CentOS7.5でPython3.7のインストール時に、OpenSSL1.0.2以上のインストールを求められたので1.1.1を入れた。
この記事ではその時の手順をまとめた。
ちなみに、ここではデフォルトで入っている1.0.2は残したまま、別途1.1.1をインストールする方法を取る。

関連記事

OpenSSLの各versionのサポート状況

1.0.2は2019-12-31にEOL。
https://www.openssl.org/policies/releasestrat.html

The next version of OpenSSL will be 3.0.0.
Version 1.1.1 will be supported until 2023-09-11 (LTS).
Version 1.1.0 will be supported until 2019-09-11.
Version 1.0.2 will be supported until 2019-12-31 (LTS).
Version 1.0.1 is no longer supported.
Version 1.0.0 is no longer supported.
Version 0.9.8 is no longer supported.

OpenSSLのインストール

依存関係のインストール

$ sudo yum install -y zlib-devel perl-core make gcc

OpenSSLのダウンロード

以下のサイトからインストールしたいバージョンをダウンロード。
https://www.openssl.org/source/

ここでは1.1.1をインストールする。

$ sudo curl https://www.openssl.org/source/openssl-1.1.1.tar.gz -o /usr/local/src/openssl-1.1.1.tar.gz

OpenSSLのインストール

$ cd /usr/local/src
$ sudo tar xvzf openssl-1.1.1.tar.gz
$ cd openssl-1.1.1/
$ sudo ./config --prefix=/usr/local/openssl-1.1.1 shared zlib
$ sudo make depend
$ sudo make
$ sudo make test
$ sudo make install

インストールされたことを確認

以下にインストールされる。

$ sudo ls -l /usr/local/openssl-1.1.1
total 0
drwxr-xr-x 2 root root  37 Apr 17 05:57 bin
drwxr-xr-x 3 root root  21 Apr 17 05:57 include
drwxr-xr-x 4 root root 159 Apr 17 05:57 lib
drwxr-xr-x 4 root root  28 Apr 17 05:58 share
drwxr-xr-x 5 root root 140 Apr 17 05:57 ssl

OpenSSLを共有ライブラリに追加する

下記ページの、「システム全体で使いたい場合」以降を実施してください。
これを行わないとOpenSSLを利用できません。

動作確認

以下コマンドで動作確認をする。TLSv1.3に対応していることがわかる。

$ sudo /usr/local/openssl-1.1.1/bin/openssl ciphers -v TLSv1.3
TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any      Au=any  Enc=CHACHA20/POLY1305(256) Mac=AEAD
TLS_AES_128_GCM_SHA256  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(128) Mac=AEAD

関連記事

参考

68
62
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
68
62