mkcert icon indicating copy to clipboard operation
mkcert copied to clipboard

Add CA root to Insomnia

Open gagaXD opened this issue 4 years ago • 9 comments

Hello,

After running a mkcert -install and generating certificates with it, It works fine on Chrome & Firefox.

But, when I'm trying to send a request with insomnia, It tells me that the certificate can not be trusted.

Is there any way to specify to mkcert other "db" where the rootCA must be installed with certutil ?

Thanks for this great package !

gagaXD avatar Mar 23 '20 14:03 gagaXD

@gagaXD Did you find a solution? I'm also keep getting the same issue with Insomnia.

francoism90 avatar May 21 '20 09:05 francoism90

You can disable certificate validation in the settings of Insomnia

alouini333 avatar Jul 14 '20 10:07 alouini333

I'd be happy to add it to the supported DBs if someone can find out where the Insomnia's root store is.

FiloSottile avatar Oct 25 '20 20:10 FiloSottile

Under the hood, Insomnia uses Curl with it's CA stored in your TEMP. For me, this was C:\Users\Finlay\AppData\Local\Temp\insomnia_2020.4.2\2017-09-20.pem.
I don't know where it is on Linux or Mac but you can find it by making a request and looking at the timeline: image

Hopefully this information will be of use :) I don't know how to "include" additional certificates but maybe someone else knows.

FinlayDaG33k avatar Nov 18 '20 22:11 FinlayDaG33k

Hey guys, seems there is an issue to improve insomnia and use OS CA certs when possible: https://github.com/Kong/insomnia/issues/1432

Another issue where someone ask to provide custom CA (one mention using Mkcert): https://github.com/Kong/insomnia/issues/675

Maybe we could ping them.

IMO: this is an issue with Insomnia which should provide a way to load custom root CA or load system root CA.

Nightbr avatar Mar 12 '21 08:03 Nightbr

Under the hood, Insomnia uses Curl with it's CA stored in your TEMP. For me, this was C:\Users\Finlay\AppData\Local\Temp\insomnia_2020.4.2\2017-09-20.pem. I don't know where it is on Linux or Mac but you can find it by making a request and looking at the timeline: image

Hopefully this information will be of use :) I don't know how to "include" additional certificates but maybe someone else knows.

Yes, you can edit the file with a text editor and add your certificates into it. I tried and it works. When the file exists Insomnia will use it directly. So it is a viable workaround but I think you'll have to re-edit the file each time Insomnia is updated.

bNobo avatar Nov 26 '21 17:11 bNobo

Aha! Thank you very much for the hack. It works just like setting --cacert to regular curl CLI.

I just noticed there is a CApath, would be nice if Insomnia sets this path so we can just place our custom CA certs there instead of editing the one in temp.

leocavalcante avatar Jun 01 '22 13:06 leocavalcante

Hi,

For latest versions 2022, the option to use the file 2017.09.20.pem is not possible anymore... :( and now it is impossible to use my own certificates from my private CA.

image

image

To use my private CA for server certificates, I disable the global option "Validate certificates" but it is not a good option.

image

I hope to use the CA system in future versions.

ghislain-bernard avatar Sep 01 '22 11:09 ghislain-bernard

It should be very good to able to use own Root CA in Insomnia. Thank you.

laszlolaszlo avatar Jun 07 '23 09:06 laszlolaszlo