Skip to content

Google Cloud SQL: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames #62

@joshxyzhimself

Description

@joshxyzhimself

Context:

Connection works if rejectUnauthorized is set to false

const sql = postgres({
  // host, port, username, password, etc..
  ssl: { ca, cert, key, rejectUnauthorized: false },
});

Not sure what's the right approach to fix it yet, but putting it out here in case someone encounters it.

Didn't encoutered this one on DigitalOcean's PostgreSQL instances.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions