valet: Laravel Valet's Self-signed Certs does not play with Firefox

A fresh install of Laravel Valet and then a valet secure <my site>.

OK, on Chrome, I can get it HTTPS – nice.

However on Firefox (and FirefoxDev), I get the insecure self-signed error. Is this because Mozilla has stricter control or just an error on Valet’s part? Or maybe Chrome has a looser control on self-signed certs. Anyone ever experienced anything like this? (Of course in prod, I would not be using a self-signed cert but that’s beside the case.)

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 15
  • Comments: 40 (5 by maintainers)

Most upvoted comments

FIREFOX SOLUTION:

Instead of manually adding exceptions separtely for each site served by valet, IMPORT valet’s CA to Firefox’s certificate Authorities: firefox certificate part 1 firefox certificates part 2 firefox certificate part 3

I had to rm ~/.config/valet/CA/* and then valet install before importing the newly created LaravelValetCASelfSigned.pem into FireFox as per the instructions posted earlier.

Now the accept button is gone on my latest version of Firefox.

FIREFOX SOLUTION:

Instead of manually adding exceptions separtely for each site served by valet, IMPORT valet’s CA to Firefox’s certificate Authorities: firefox certificate part 1 firefox certificates part 2 firefox certificate part 3

Thanks a lot @drbyte . Just followed your instructions on the latest Firefox Developer browser on macOS Catalina and it worked really well.

Downloaded the latest Firefox Developer Edition and was able to open Valet sites using the certs it creates. Still able to add each individual site as a security exception

Are ya’ll still using the .dev domain? That domain no longer works unless you’re Google. It stopped working in Chrome back in December and Firefox just added it to the preloaded HSTS lists. So that could be your issue. Try using .test or .localhost (or anything not in the HSTS lists) as your dev domain https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

Valet adds the certificate as “trusted” in the OSX keychain. However – Firefox uses its own certificate manager, so doesn’t see it.

I was still using the dev domain. Thanks for the response.

You don’t need to change TLD. You must completely clear (not remove, only clear) valet, clear everything about valet in KeyChain (I’m using Macos). For clearing keychain you can search “valet” in search box and delete these.

How to clear valet? Let me write all commands.

rm ~/.config/valet/CA/*
rm ~/.config/valet/Certificates/*
rm ~/.config/valet/Nginx/*
rm ~/.config/valet/Sites/*

You need only remove content of these folders. After that you can use valet link and valet secure commands. Valet will create new SSL files in CA and Certificates folder and import these to system certificates. And everything is fine now.

I had to rm ~/.config/valet/CA/* and then valet install before importing the newly created LaravelValetCASelfSigned.pem into FireFox as per the instructions posted earlier.

After I imported the Valet CA certificate nothing changed… found this thread and I realized my certificate had expired as well so removed it as you suggested and installed Laravel Valet again. Thanks for the tip.

I’m facing the same problem on firefox. But dev domain works well on safari. I change dev domain to local domain, and now I can continue my work. Thanks @AnalogMemory for the link!

have you tried importing the CA? https://vimeo.com/245172191

FF 59 does not offer a solution. I am forced to use another browser now! A self-signed certificate is not accepted anymore! Adding a website as exception does not solve the problem.

Who knows a solution? Is it possible to use another CA?