Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames #2177

Open
Jooeee opened this issue Aug 16, 2023 · 1 comment

Comments

@Jooeee
Copy link

Jooeee commented Aug 16, 2023

Im trying to connect to a Google Cloud Platform MySQL instance with SSL enabled using a public IP. However I get the error:

Error: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: IP: xx.xx.xxx.xx is not in the cert's list

If I set reject unauthorised to false it works correctly.

There is no way to add the IP to the altnames because Google generates the certificates automatically. I also can't connect to the instance using a hostname because that isn't supported by Google. I've tried adding checkServerIdentity: () => null to the ssl options but get the same results. Is there any secure work around to this?

@sidorares
Copy link
Owner

unfortunately checkServerIdentity can't be passed from the config yet, but I plan to add that

linking related issue: #2172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants