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의 추가 정보

뭔가 잘못됐고 제목이 유일한 단서입니다.

아파치:

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

아파치 재시작

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.

관련 정보