Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1854

https connection using CURL from command line

$
0
0

I am new to Curl and Cacerts world and facing a problem while connecting to a server.Basically, I need to test connectivity over https from one machine to another machine.I have a URL to which I need to connect from Machine A (a linux machine)I tried this on command prompt

cmd> curl https://[my domain or IP address]

and got the following:

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

On going through some articles over internet I did this:

openssl s_client -connect <domain name or Ip address>:443

and got some response including theserver certificate (inside -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----).

What should I do next from here. I think, I will have to just copy paste the text insideBEGIN CERTIFICATE & END CERTIFICATE and save it in a file.But, What type of file it should be? .pem, .crt ?..What should I be do after that?

I tried this - copied the text inside BEGIN CERTIFICATE & END CERTIFICATE and saved it in a .crt file - named it as my-ca.crt (also tried the same thing by naming it as my-ca.pem file)and then did this:

cmd>curl --cacert my-ca.crt https://[my domain or IP address]

But got the same error.


Viewing all articles
Browse latest Browse all 1854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>