FiloSottile / mkcert

A simple zero-config tool to make locally trusted development certificates with any names you'd like.
https://mkcert.dev
BSD 3-Clause "New" or "Revised" License
49.16k stars 2.54k forks source link

Add CA root to Insomnia #249

Open gagaXD opened 4 years ago

gagaXD commented 4 years ago

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 !

francoism90 commented 4 years ago

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

alouini333 commented 4 years ago

You can disable certificate validation in the settings of Insomnia

FiloSottile commented 4 years ago

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

FinlayDaG33k commented 3 years ago

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.

Nightbr commented 3 years ago

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.

bNobo commented 2 years ago

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.

leocavalcante commented 2 years ago

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.

ghislain-bernard commented 2 years ago

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.

laszlolaszlo commented 1 year ago

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