I'm trying to use the API for the Swedish payment service Swish on my Ubuntu server, but I can't get it to work. I believe the problem is with the certificates.
I have generated a CSR (without a pass phrase) and used that to create a "client certificate". I also have a Root CA from Swish. I've tried to use the code from https://webcache.googleusercontent.com/search?q=cache:fSib0nCGpfsJ:https://github.com/davidanton1d/getswish-api+&cd=1&hl=sv&ct=clnk&gl=se (original URL suddenly doesn't exist) but only get the error message “Curl failed with error #60: SSL certificate problem: self signed certificate in certificate chain”.
When I try to use curl in the terminal I get this output:
Trying 126.96.36.199... Connected to mss.swicpc.bankgirot.se (188.8.131.52) 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
The documentation for the API and also test certificates are available at https://developer.getswish.se/merchants/
What am I doing wrong?