Matt
Matt

Reputation: 1043

Postman how to send server SSL certificate client.crt

I want to convert the following curl into a Postman script:

curl --cacert ca.crt --key client.key --cert client.crt "https://myurl"

All three SSL parts are required, i.e. client cert, client key AND server cert.

In Postman settings - certificates, I can set the CLIENT crt and the client KEY....but how do I set the server cert that is also required otherwise the request will fail.

Upvotes: 3

Views: 9529

Answers (1)

Matt
Matt

Reputation: 1043

To resolve this I converted ca.crt, client.key and client.crt into a .pfx file using this command:

openssl pkcs12 -export -out certificate.pfx -inkey client.key -in client.crt -certfile CA.crt

This created a file called certificate.pfx

[You will be prompted whether you want to add a password for the file or not].

  • Open Postman – click on the settings cog and then choose Settings
  • Click on Certificates
  • Click on ‘Add Certificate’ to the right of Client Certificates
  • In the Host section set the url as required for your API
  • In the PFX file section click on Select File and browse to certificate.pfx
  • If you created a password for certificate.pfx - enter that in the Passphrase section
  • Click on ‘Add’
  • Close Settings
  • You should now be able to send the request to the API and get a successful response

Upvotes: 3

Related Questions