在Ubuntu 14.04 LTS上我的nginx有问题.我不时会收到一个严重的错误:
2015/01/18 12:59:44 [crit] 1065#0: *28289 SSL_do_handshake() failed (SSL: error:140A1175:SSL routines:SSL_BYTES_TO_CIPHER_LIST:inappropriate fallback) while SSL handshaking, client: 10.0.2.2, server: 0.0.0.0:443
Run Code Online (Sandbox Code Playgroud)
我查看了我的OpenSSL版本:
root@www:~# ldd `which nginx` | grep ssl
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f39e236b000)
root@www:~# strings /lib/x86_64-linux-gnu/libssl.so.1.0.0 | grep "^OpenSSL "
OpenSSL 1.0.1f 6 Jan 2014
Run Code Online (Sandbox Code Playgroud)
我搜索了有关它的更多信息,发现它可能与旧版OpenSSL有关.所以我试着编译最新版本:
wget https://www.openssl.org/source/openssl-1.0.1l.tar.gz && tar xzf && cd openssl-1.0.1l
./config && make && make install
Run Code Online (Sandbox Code Playgroud)
我还通过符号链接替换了新的OpenSSL二进制文件:
ln -sf /usr/local/ssl/bin/openssl `which openssl`
Run Code Online (Sandbox Code Playgroud)
之后我有:
root@www:~# openssl version
OpenSSL 1.0.1l 15 Jan 2015
Run Code Online (Sandbox Code Playgroud)
但我仍然在nginx中使用旧版本:
root@www:~# strings /lib/x86_64-linux-gnu/libssl.so.1.0.0 | …Run Code Online (Sandbox Code Playgroud)