在 Ubuntu 16.04 上使用带证书的curl,(35) gnutls_handshake() 失败:握手失败

在 Ubuntu 16.04 上使用带证书的curl,(35) gnutls_handshake() 失败:握手失败

我正在尝试在我的 Ubuntu 服务器上使用瑞典支付服务 Swish 的 API,但无法让它工作。我认为问题出在证书上。

我已经生成了 CSR(没有密码)并使用它来创建“客户端证书”。我还有 Swish 的根 CA。我尝试使用来自的代码https://webcache.googleusercontent.com/search?q=cache:fSib0nCGpfsJ:https://github.com/davidanton1d/getswish-api+&cd=1&hl=sv&ct=clnk&gl=se(原始 URL 突然不存在)但只收到错误消息“Curl 失败,错误 #60:SSL 证书问题:证书链中的自签名证书”。

当我尝试在终端中使用curl时,我得到以下输出:

Trying 194.242.111.76...
Connected to mss.swicpc.bankgirot.se (194.242.111.76) port 443 (#0)
found 2 certificates in /certs/swish/swish-root.crt
found 592 certificates in /etc/ssl/certs
ALPN, offering http/1.1
gnutls_handshake() failed: Handshake failed
Closing connection 0
curl: (35) gnutls_handshake() failed: Handshake failed

API 文档和测试证书可在以下位置获取:https://developer.getswish.se/merchants/

我究竟做错了什么?

相关内容