Skip to content

Conversation

@zregvart
Copy link

@zregvart zregvart commented Jun 5, 2025

The TLS tests in ssl_test.go assert that specific errors are reported for specific situations. This fails on newer (1.20+) versions of go since tls.CertificateVerificationError is returned instead of the expected, contrary to older versions where x509.UnknownAuthorityError or x509.HostnameError would be returned.

This maintains the same assertions on go < 1.20, and allows for the new error on go >= 1.20.

In addition to that, on MacOS the error string x509: “postgres” certificate is not standards compliant is returned instead of any of these, this seems to be due to the version of OpenSSL provided by MacOS, see golang/go#51991 for details.

The TLS tests in `ssl_test.go` assert that specific errors are reported for specific situations. This fails on newer (1.20+) versions of go since `tls.CertificateVerificationError` is returned instead of the expected, contrary to older versions where `x509.UnknownAuthorityError` or `x509.HostnameError` would be returned. This maintains the same assertions on go < 1.20, and allows for the new error on go >= 1.20. In addition to that, on MacOS the error string `x509: “postgres” certificate is not standards compliant` is returned instead of any of these, this seems to be due to the version of OpenSSL provided by MacOS, see golang/go#51991 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant