我们有在线购物网站。 当我要结帐页面,我得到这样的错误“错误:14094410:SSL例程:SSL3_READ_BYTES:sslv3警报握手失败(35)”
从Apache的错误日志,我可以看到一些尝试连接到api.paypal.com。 这是我的Apache错误日志的一部分
* About to connect() to api.paypal.com port 443 (#0) * Trying 66.211.168.123... * connected * Connected to api.paypal.com (66.211.168.123) port 443 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure * Closing connection #0
当我试图连接到api.paypal.com使用curl我得到这样的错误
curl -iv https://api.paypal.com/ * About to connect() to api.paypal.com port 443 (#0) * Trying 66.211.168.91... connected * Connected to api.paypal.com (66.211.168.91) port 443 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * SSLv3, TLS handshake, Server hello (2): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Request CERT (13): * SSLv3, TLS handshake, Server finished (14): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Client key exchange (16): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSLv3, TLS alert, Server hello (2): * error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure * Closing connection #0 curl: (35) error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
openssl s_client在解释这里发生的事情方面做得更好,因为它给出了接收还是发送这些消息。 api.paypal.com正在请求一个特定的客户端证书(这是* SSLv3, TLS handshake, Request CERT (13)线curl正在打印),并且您发送错误(或否)证书,因此您的连接失败:
SSL_connect:before/connect initialization SSL_connect:SSLv2/v3 write client hello A SSL_connect:SSLv3 read server hello A SSL_connect:SSLv3 read server certificate A SSL_connect:SSLv3 read server certificate request A SSL_connect:SSLv3 read server done A SSL_connect:SSLv3 write client certificate A SSL_connect:SSLv3 write client key exchange A SSL_connect:SSLv3 write change cipher spec A SSL_connect:SSLv3 write finished A SSL_connect:SSLv3 flush data SSL3 alert read:fatal:handshake failure SSL_connect:failed in SSLv3 read finished A 6016:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1086:SSL alert number 40 6016:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
用PayPalsearchAPI信息,看起来你需要为API申请一个客户端证书 。 他们也有一个用户名/密码“签名”选项,但是这个选项使用一个完全不同的服务器 。 如果你有这些,那么configuration你的购物车软件来使用它是一个问题,与车开发商。 如果您是开发人员并且拥有证书,请参阅–cert,–cert-type,–key和–key-type标志来curl以configuration证书和私钥curl使用。
我遇到了同样的问题。
因为我不会在Centos上打开443端口。
所以你结帐443端口!
sudo losf -i tcp:443
解决方法:
cd /etc/httpd/conf.d vim ssl.conf
在第一行添加两行:
LoadModule ssl_module modules/mod_ssl.so Listen 443
你可以试试!