Using curl with certificates on Ubuntu 16.04
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 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
The documentation for the API and also test certificates are available at https://developer.getswish.se/merchants/
What am I doing wrong?
curl ssl certificates
add a comment |
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 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
The documentation for the API and also test certificates are available at https://developer.getswish.se/merchants/
What am I doing wrong?
curl ssl certificates
add a comment |
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 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
The documentation for the API and also test certificates are available at https://developer.getswish.se/merchants/
What am I doing wrong?
curl ssl certificates
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 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
The documentation for the API and also test certificates are available at https://developer.getswish.se/merchants/
What am I doing wrong?
curl ssl certificates
curl ssl certificates
edited Apr 5 at 22:45
asked Apr 5 at 14:32
Thomas
62
62
add a comment |
add a comment |
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435774%2fusing-curl-with-certificates-on-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435774%2fusing-curl-with-certificates-on-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown