47

I try to test REST api in Postman but every time I try to POST I get the following error

Error: self signed certificate in certificate chain.

I have tried with the SSL certificate verification on and off but both methods dont work. Postman is also updated to latest v7.3.6. Tbh I dont know what to try anymore and would really appreciate any tip.

Shaheryar.Akram
  • 722
  • 10
  • 19
Nedim
  • 481
  • 1
  • 4
  • 7
  • Try checking the validity of the certificate from online sources or through Open SSL and see if it's a valid certificate. – Shaheryar.Akram Aug 09 '19 at 06:35
  • Please refer to this link if it can help you out : https://blog.getpostman.com/2019/07/17/self-signed-ssl-certificate-troubleshooting/ – Jaspreet kaur Aug 09 '19 at 06:57
  • 3
    This question doesn't have an answer that was marked as the answer, and the original question is ambiguous. You didn't indicate whether you had setup a certificate so it's not clear how this question or answer could ever help anyone else. – shawn1874 Sep 28 '21 at 21:44

4 Answers4

81

Go to Postman Settings > General > turn OFF SSL certificate verification enter image description here

Puneet
  • 1,443
  • 14
  • 20
10

"make ssl certificate verification on and make it still work"

If you're under organization environment, you can:

  1. Export your organization self-signed certificate as Base-64 encoded X.509 (.CER) format flat file. It could be done from Chrome.
  2. Go back to Postman: Settings -> Certificates -> CA Certificates, switch on and select the file you just exported.
Jun ZHOU
  • 131
  • 2
  • 8
  • 1
    I guess it is .cer (not .cre, please correct that typo) – rinilnath Jul 07 '22 at 06:45
  • Also when i added this alone it is not working as well. – rinilnath Jul 07 '22 at 06:46
  • Hello @rinilnath, what's the error you're encountering after applying the certificate? – Jun ZHOU Jul 08 '22 at 09:38
  • Error: error:0900006e:PEM routines:OPENSSL_internal:NO_START_LINE. This error when i added a .cer file under "client certificates" options – rinilnath Jul 10 '22 at 01:57
  • As per your answer when i added a .PEM file under "CA Certificate" i get the same self signed certificate "SSL Error: Self signed certificate in certificate chain" – rinilnath Jul 10 '22 at 01:58
  • Hi @rinilnath, I just checked my latest configuration again and I realized there are something different. 1. Install git and you can get file ca-bundle.crt under path C:\Program Files\Git\usr\ssl\certs or C:\Program Files\Git\mingw64\ssl\certs 2. Copy this file to a new place and maintain it by yourself. 3. Following step 1 "Export your organization self-signed certificate as Base-64 encoded X.509 (.CER) format flat file. It could be done from Chrome.", copy the Base-64 content into this ca-bundle.crt. 4. In postman CA certifictes setting, select this file. – Jun ZHOU Jul 11 '22 at 07:31
0

Adding CA certificates doesn't work for me. My certs are not self-signed but got the same error. Adding client certificates solved my problem. Quoted docs from Postman here: To send requests to an API that uses mutual TLS authentication, add your client certificate to Postman.

enter image description here

Weihui Guo
  • 3,669
  • 5
  • 34
  • 56
0

I used mkcert and here's how I managed to get rid of the error :

  • On the Site Information Icon, click where it's written Connection Not Secure enter image description here

  • On the Connection Info dialog, click on More Information enter image description here

  • On Page Info, click on View Certificate enter image description here

  • On the Certificate tab, scroll down till where you'll see 2 links for the PEM files, and download the PEM (Chain) file enter image description here

  • On Postman, go to Settings -> Certificates -> CA Certificates (make sure the toggle button is ON), and specify (click on Select File) the location of your PEM Chain file. enter image description here

There you are !!!