Skip to content

Commit

Permalink
Remove language dependent check to look for TLS config.
Browse files Browse the repository at this point in the history
  • Loading branch information
bck01215 authored and jackc committed Jun 24, 2023
1 parent d361e70 commit 4c4dc6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pgconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er
const ERRCODE_INVALID_CATALOG_NAME = "3D000" // db does not exist
const ERRCODE_INSUFFICIENT_PRIVILEGE = "42501" // missing connect privilege
if pgerr.Code == ERRCODE_INVALID_PASSWORD ||
pgerr.Code == ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION && strings.Contains(pgerr.Message, "SSL on") ||
pgerr.Code == ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION && fc.TLSConfig != nil ||
pgerr.Code == ERRCODE_INVALID_CATALOG_NAME ||
pgerr.Code == ERRCODE_INSUFFICIENT_PRIVILEGE {
break
Expand Down

0 comments on commit 4c4dc6f

Please sign in to comment.