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
48.31k stars 2.49k forks source link

NET::ERR_CERT_AUTHORITY_INVALID after a while of working properly #424

Open Nefcanto opened 2 years ago

Nefcanto commented 2 years ago

Hi

I have been using mkcert for some months now and everything was working great.

However, today I suddenly saw the NET::ERR_CERT_AUTHORITY_INVALID error.

I have not changed mkcert anyhow.

I tried to verify my certificate, using openssl:

openssl verify --verbose /project/cert.pem

And this is the result:

O = mkcert development certificate, OU = root@MyLaptop
error 20 at 0 depth lookup: unable to get local issuer certificate
error /project/cert.pem: verification failed

I tried to uninstall mkcert, but since I have installed it outside apt, I did not know how to uninstall it. Here's my installation script:

    sudo apt install libnss3-tools
    wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64
    sudo cp mkcert-v1.4.3-linux-amd64 /usr/local/bin/mkcert
    sudo chmod +x /usr/local/bin/mkcert
    mkcert -install

I ran mkcert -uninstall and closed Chrome and ran mkcert -install and reopened Chrome, but still no results.

What should I do? How can I fix this?

mattKaczorowski commented 2 years ago

I too am experiencing this issue with chrome and firefox on Ubuntu. Funny enough both curl and wget work fine. Both browsers have the mkcert root cert installed, yet the browsers do not trust the certs.

Nefcanto commented 2 years ago

@mattKaczorowski I ended up completely reinstalling everything, even Ubuntu. It was truly annoying.

mattKaczorowski commented 2 years ago

@Nefcanto Did reinstalling fix the issue? I have tried and it did not work. Also, tried this on three different Ubuntu 20.04 machines, same result. I wonder what changed on the browser's end...

Nefcanto commented 2 years ago

@mattKaczorowski yes. For me reinstalling my OS and everything solved it. Though it was extremely annoying.

MaxRazen commented 2 years ago

Ubuntu 20.04 / Chrome 100.0.4896.88 the same issue. Does anyone have a solution?

@Nefcanto Could you clarify please, what is the difference between your linux installations? Have you downgraded the OS version?

UPD: I realized that forget to run mkcert -install, and after restarting browsers everything is working as suspected

Nefcanto commented 2 years ago

@MaxRazen, I just remember that I had to reinstall everything, including my OS.

This is my installation general guidelines and this is my installation script for other applications.