FiloSottile/mkcert

Mkcert Certificates causes flutter cli tools to throw tls error

e-reifer opened this issue · 3 comments

Environment

  • Operating system (including version): macOS Ventura 13.4.1
  • mkcert version (from mkcert -version): v.1.4.4
  • Server (where the certificate is loaded):
  • Client (e.g. browser, CLI tool, or script): CLI (bin/bash)

What you did

What went wrong

Mkcerts prohibits the flutter cli to be able to get packages as the terminal browser uses the system-wide certitifacate generated by mkcert. I have not found a way to disable this.

flutter doctor shows this:
[!] Network resources ✗ A cryptographic error occurred while checking "https://pub.dev/": Handshake error in client You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.

flutter pub get shows TLS error:

Got TLS error trying to find package args at https://pub.dev

Any help is appreciated

Could resolve it myself with the help of chatgpt. Mkcert was just a side effect. The real cause was me using dnsmasq service the unintentionally redirected all "pub.dev" results to localhost while using mkcert's certificate.

hi @e-reifer , so how did you solve it ?

I've checked the dnsmasq.conf file /opt/homebrew/etc/dnsmasq.conf and deleted a line similar to address=/.dev/127.0.0.1