jessieで逆さまに更新した後、OpenSSLヘッダーバージョンエラーが発生しました。

jessieで逆さまに更新した後、OpenSSLヘッダーバージョンエラーが発生しました。

2016年5月3日、OpenSSL 1.0.1tを使用するDebian Jessieにサーバーがあります。

OpenSSLを1.0.2にアップデートして設定したいです。カスタムDHパラメータ

だから私は追加しましたバックポートsources.list新しいOpenSSLバージョンに移動してインストールします。

apt-get -t jessie-backports install openssl

インストール後にApacheを再起動しましたが、phpinfoで無効なOpenSSLヘッダのバージョンを見ることができます。

PHP Version 7.0.17-1~dotdeb+8.1
OpenSSL Library Version OpenSSL 1.0.2k 26 Jan 2017
OpenSSL Header Version  OpenSSL 1.0.1t 3 May 2016
Openssl default config  /usr/lib/ssl/openssl.cnf 

この問題をどのように解決できますか?

編集者 - Stephen Kittの追加情報

何かが間違っていてタイトルが唯一の手がかりです。

Apache:

apachectl -V

Server version: Apache/2.4.10 (Debian)
Server built:   Feb 24 2017 18:40:28
Server's Module Magic Number: 20120211:37
Server loaded:  APR 1.5.1, APR-UTIL 1.5.4
Compiled using: APR 1.5.1, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="mime.types"
 -D SERVER_CONFIG_FILE="apache2.conf"

OpenSSL

openssl version -a
OpenSSL 1.0.2k  26 Jan 2017
built on: reproducible build, date unspecified
platform: debian-amd64
options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: gcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/lib/ssl"

ssl.confにDHパラメータを追加した後にエラーが発生します。

SSLOpenSSLConfCmd DHParameters /etc/ssl/private/dhparams.pem

Apacheの再起動

service apache2 restart
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.

systemctl 状態 apache2.service

● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─forking.conf
   Active: failed (Result: exit-code) since wto 2017-03-28 16:25:26 CEST; 11s ago
  Process: 43828 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 51393 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
  Process: 43857 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

mar 28 16:25:26 domain.com apache2[43857]: Starting web server: apache2 failed!
mar 28 16:25:26 domain.com apache2[43857]: The apache2 configtest failed. ... (warning).
mar 28 16:25:26 domain.com apache2[43857]: Output of config test was:
mar 28 16:25:26 domain.com apache2[43857]: AH00526: Syntax error on line 54 of /etc/apache2/mods-enabled/ssl.conf:
mar 28 16:25:26 domain.com apache2[43857]: Invalid command 'SSLOpenSSLConfCmd', perhaps misspelled or defined by a module not included in the server configuration
mar 28 16:25:26 domain.com apache2[43857]: Action 'configtest' failed.
mar 28 16:25:26 domain.com apache2[43857]: The Apache error log may have more information.
mar 28 16:25:26 domain.com systemd[1]: apache2.service: control process exited, code=exited status=1
mar 28 16:25:26 domain.com systemd[1]: Failed to start LSB: Apache2 web server.
mar 28 16:25:26 domain.com systemd[1]: Unit apache2.service entered failed state.

ベストアンサー1

ヘッダーはlibssl-devパッケージで提供されるため、試してみることができます。

apt-get -t jessie-backports install libssl-dev

(しかし、opensslこれはopensslコマンドラインのフロントエンドです。OpenSSLライブラリはlibssl1.0.0パッケージにあります。)

しかし、、「OpenSSLヘッダーバージョン」情報がビルド時にPHPモジュールに保存されると思われるため、OpenSSLをアップグレードしてもその情報は変更されません。とにかく関係ありません。ライブラリをアップグレードするだけです。

SSLOpenSSLConfCmdhttpd 2.4.8以降でのみ動作します(もしそうなら)コンパイル済みOpenSSLヘッダー1.0.2以降を使用してください。これは、単にライブラリをアップグレードするだけでは改善できない機能の例です。また、ヘッダーをアップグレードして再構築する必要がありますmod_ssl

おすすめ記事