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

verify-ca sslmode not working as expected #934

Open
nmiculinic opened this issue Feb 7, 2021 · 3 comments
Open

verify-ca sslmode not working as expected #934

nmiculinic opened this issue Feb 7, 2021 · 3 comments

Comments

@nmiculinic
Copy link

I get the following error when using pgx.ParseConnectionString(cfg.DatabaseDSN) with sslmode=verify-ca

"x509: cannot validate certificate for 34.107.126.58 because it doesn't contain any IP SANs"

The usual PostgreSQL tools work as expected (dbmate, InteliJ IDE database connectors)

@jackc
Copy link
Owner

jackc commented Feb 8, 2021

Are you using v4?

@pjediny
Copy link
Contributor

pjediny commented Feb 24, 2021

@nmiculinic Did you try GODEBUG=x509ignoreCN=0? It looks like the common name matching for hostnames is deprecated and will be removed in go 1.17.

@ZPascal
Copy link

ZPascal commented Apr 20, 2021

I currently have the same problem. I think the problem has been solved since version 4.0.6 by updating pgconn to v1.5.0.

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

4 participants