Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CURL to pass SSL certifcate and password

I need to specify a certificate with CURL i tried with --cert option it is not working.

Could you please let me know to specify the keystore and passpharse while invoking with curl?

like image 367
Adam Avatar asked Sep 25 '13 20:09

Adam


People also ask

How do I pass a certificate and key in curl?

To authenticate with a private key and certificate using curl, you will need to provide the --key and --cert options to your request. The private key must be decrypted in plain text. The provided certificate must contain the corresponding public key.

How do I give a certificate in curl command?

How to send a client certificate using Curl? To send a client certificate to the server when communicating over HTTPS or FTPS protocol, you can use the -E or --cert command-line switch. The client certificate must be in PKCS#12 format for Secure Transport or PEM format if using any other mechanism.

Does curl check SSL certificate?

curl performs peer SSL certificate validation by default. This is done using a certificate store that the SSL library can use to make sure the peer's server certificate is valid.


1 Answers

Should be:

curl --cert certificate_file.pem:password https://www.example.com/some_protected_page
like image 130
Welsh Avatar answered Sep 30 '22 08:09

Welsh