With the latest versions of Chrome, Edge, or Chromium, it’s no longer possible to load pages with self-signed certs and they provide a NET::ERR_CERT_INVALID error.
When you go to the “Advanced” button it does not allow you to ignore and proceed.
To work around this you can download the certificate. Then import it into the trusted certificate store.
I used OpenSSL to download the certificate, but there are other options. Here are the commands I used.
1 2 3 4 5 6 |
server=myserver.com openssl s_client -connect ${server}:443 \ -showcerts </dev/null 2>/dev/null|\ openssl x509 -outform PEM >${server}.pem sudo security add-trusted-cert -d -r trustAsRoot \ -p ssl -k /Library/Keychains/System.keychain ${server}.pem |
This will add your certificate to the System Keychain and trust it as an SSL certificate.
If you get an the error:
1 |
SecTrustSettingsSetTrustSettings: One or more parameters passed to a function were not valid. |
try replacing
1 |
-r trustAsRoot |
to
1 |
-r trustRoot |