Aru*_*unS 9 ssl ssl-certificate
我们有网上购物网站。当我要结帐页面时,我收到这样的错误“错误: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
Run Code Online (Sandbox Code Playgroud)
当我尝试使用 curl 连接到 api.paypal.com 时,我收到了这样的错误
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
Run Code Online (Sandbox Code Playgroud)
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:
Run Code Online (Sandbox Code Playgroud)
谷歌搜索 paypal api 信息,看来您需要为 API 请求客户端证书。他们还有一个用户名/密码“签名”选项,但该选项使用完全不同的服务器。如果您有这些,那么配置您的购物车软件以使用它们是购物车开发人员需要解决的问题。如果您是开发人员并且拥有证书,请参阅 --cert、--cert-type、--key 和 --key-type 标志来curl配置curl 使用的证书和私钥。
| 归档时间: |
|
| 查看次数: |
74271 次 |
| 最近记录: |