mkcert icon indicating copy to clipboard operation
mkcert copied to clipboard

NET::ERR_CERT_AUTHORITY_INVALID after a while of working properly

Open Nefcanto opened this issue 3 years ago • 6 comments

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?

Nefcanto avatar Jan 24 '22 12:01 Nefcanto

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.

mattKaczorowski avatar Feb 11 '22 21:02 mattKaczorowski

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

Nefcanto avatar Feb 12 '22 04:02 Nefcanto

@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...

mattKaczorowski avatar Feb 14 '22 17:02 mattKaczorowski

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

Nefcanto avatar Feb 17 '22 06:02 Nefcanto

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

MaxRazen avatar Apr 12 '22 18:04 MaxRazen

@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.

Nefcanto avatar Apr 14 '22 06:04 Nefcanto