web-dev-qa-db-ja.com

Paypal OpenSSL1.0.1アップデート

OpenSuse 11.4サーバーのopensslライブラリをアップグレードして、新しいPaypalセキュリティ標準に一致させようとしています( https://www.Paypal-knowledge.com/infocenter/index?page=content&widgetview=true&id= FAQ1914&viewlocale = en_US )。

以前、このopensslバージョンをインストールしていました。

openssl version
OpenSSL 1.0.0c 2 Dec 2010

更新を確認しました:

zypper update openssl
Loading repository data...
Warning: Repository 'Updates for openSUSE 11.4 11.4-0' appears to outdated. Consider using a different mirror or server.
Reading installed packages...
No update candidate for 'openssl-1.0.0c-18.42.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Zypperが新しいopensslバージョンを見つけることができなかったので、私はEvergreenリポジトリを追加しました。

Sudo zypper ar --refresh -r http://download.opensuse.org/evergreen/11.4/openSUSE:Evergreen:11.4.repo
Adding repository 'Evergreen update repository for openSUSE 11.4 (standard)' [done]
Repository 'Evergreen update repository for openSUSE 11.4 (standard)' successfully added
Enabled: Yes
Autorefresh: Yes
URI: http://download.opensuse.org/repositories/openSUSE:/Evergreen:/11.4/standard/

次に、リポジトリを更新しました。

zypper refresh
Repository 'Updates for openSUSE 11.4 11.4-0' is up to date.
Retrieving repository 'Evergreen update repository for openSUSE 11.4 (standard)' metadata [\]

New repository or package signing key received:
Key ID: 241B84B36A0F1588
Key Name: openSUSE:Evergreen OBS Project <openSUSE:[email protected]>
Key Fingerprint: D25EAF514D59C654B9BCE005241B84B36A0F1588
Key Created: Fri 15 May 2015 03:33:05 PM CEST
Key Expires: Sun 23 Jul 2017 03:33:05 PM CEST
Repository: Evergreen update repository for openSUSE 11.4 (standard)

Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): a
Retrieving repository 'Evergreen update repository for openSUSE 11.4 (standard)' metadata [done]
Building repository 'Evergreen update repository for openSUSE 11.4 (standard)' cache [done]
Repository 'openSUSE-11.4-Non-Oss' is up to date.
Repository 'openSUSE-11.4-Oss' is up to date.
All repositories have been refreshed.

そして最後にopensslアップデート:

zypper update openssl
Loading repository data...
Warning: Repository 'Updates for openSUSE 11.4 11.4-0' appears to outdated. Consider using a different mirror or server.
Warning: Repository 'Evergreen update repository for openSUSE 11.4 (standard)' appears to outdated. Consider using a different mirror or server.
Reading installed packages...
Resolving package dependencies...

The following package is going to be upgraded:
  openssl 

1 package to upgrade.
Overall download size: 541.0 KiB. After the operation, additional 77.0 KiB will be used.
Continue? [y/n/?] (y): y
Retrieving package openssl-1.0.1p-74.1.x86_64 (1/1), 541.0 KiB (1.3 MiB unpacked)
Retrieving: openssl-1.0.1p-74.1.x86_64.rpm [done (844.4 KiB/s)]
Installing: openssl-1.0.1p-74.1 [done]

Apacheを再起動しました:

/etc/init.d/Apache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate)                                                              done
Starting httpd2 (prefork)

そしてPaypalへの準拠を確認しました:

php -r '$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://tlstest.Paypal.com/"); var_dump(curl_exec($ch)); var_dump(curl_error($ch));'
bool(false)
string(67) "Unknown SSL protocol error in connection to tlstest.Paypal.com:443 "

Opensslバージョンで「(ライブラリ:OpenSSL 1.0.0c 2010年12月2日)」と表示されます。

openssl version -a
OpenSSL 1.0.1p 9 Jul 2015 (Library: OpenSSL 1.0.0c 2 Dec 2010)
built on: 2012-05-23 05:01:20.000000000 +0000
platform: linux-x86_64
options:  bn(64,64) rc4(1x,char) des(idx,cisc,16,int) blowfish(idx) 
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wa,--noexecstack -fomit-frame-pointer -fno-strict-aliasing -DTERMIO -DPURIFY -Wall -fstack-protector  -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DWHIRLPOOL_ASM
OPENSSLDIR: "/etc/ssl"

Opensslが更新されたようですが、まだ古い1.0.0ライブラリを使用しています...システムが最新の2016 Paypalセキュリティ標準に準拠するようにこれを修正する方法について何かアイデアはありますか?

3
Niko Zarzani

問題は、Apacheインストールが新しいOpenSSLインストールの共有ライブラリをリンクできないことだと思います。コマンドldd /usr/local/Apache/modules/mod_ssl.soを実行します(mod_ssl.soへの適切なパスを使用)。 mod_ssl.soが/usr/local/ssl/libのライブラリにリンクしていないことがわかります。

問題を解決するためのいくつかのオプションがあります。

オプション#1-ライブラリ内のリンク:

編集のために/etc/ld.so.conf.d/local.confを開き、次の行を追加します:/usr/local/openssl/lib

Apacheを再コンパイルし(make cleanを忘れないでください)、動作するはずです。

それがうまくいかない場合。 LDFLAGSコマンドを使用してconfigureを直接指定することもできます。

LDFLAGS=-L/usr/local/ssl/lib \ ./configure --with-included-apr --prefix=/usr/local/Apache2 --enable-so     
--enable-rewrite --with-ssl=/usr/local/ssl --enable-ssl=shared
--enable-deflate --enable-expires --enable-headers

オプション#2-システムOpenSSLをアップグレードします:

構成行./config --prefix=/usr --openssldir=/usr/local/openssl sharedを使用してOpenSSLを再インストールします

設定行でプレフィックスが指定されていない場合、OpenSSLインストーラーはデフォルトで/usr/local/sslになります。

クイックインストール手順:

cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
tar -zxf openssl-1.0.2*
cd openssl-1.0.2*
./config --prefix=/usr --openssldir=/usr/local/openssl shared
make
make test
make install
3
Michael D