Merge pull request #476 from tejasmanohar/remove_tls_renegotiation_msg

tls: stop sending ssl_renegotiation_limit in startup message
pull/479/head
Jack Christensen 2018-11-03 15:03:23 -05:00 committed by GitHub
commit a76c2eb9c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -337,14 +337,6 @@ func (c *Conn) connect(config ConnConfig, network, address string, tlsConfig *tl
Parameters: make(map[string]string), Parameters: make(map[string]string),
} }
// Default to disabling TLS renegotiation.
//
// Go does not support (https://github.com/golang/go/issues/5742)
// PostgreSQL recommends disabling (http://www.postgresql.org/docs/9.4/static/runtime-config-connection.html#GUC-SSL-RENEGOTIATION-LIMIT)
if tlsConfig != nil {
startupMsg.Parameters["ssl_renegotiation_limit"] = "0"
}
// Copy default run-time params // Copy default run-time params
for k, v := range config.RuntimeParams { for k, v := range config.RuntimeParams {
startupMsg.Parameters[k] = v startupMsg.Parameters[k] = v

7
doc.go
View File

@ -236,6 +236,13 @@ nil, then TLS will be disabled. If it is present, then it will be used to
configure the TLS connection. This allows total configuration of the TLS configure the TLS connection. This allows total configuration of the TLS
connection. connection.
pgx has never explicitly supported Postgres < 9.6's `ssl_renegotiation` option.
As of v3.3.0, it doesn't send `ssl_renegotiation: 0` either to support Redshift
(https://github.com/jackc/pgx/pull/476). If you need TLS Renegotiation,
consider supplying `ConnConfig.TLSConfig` with a non-zero `Renegotiation`
value and if it's not the default on your server, set `ssl_renegotiation`
via `ConnConfig.RuntimeParams`.
Logging Logging
pgx defines a simple logger interface. Connections optionally accept a logger pgx defines a simple logger interface. Connections optionally accept a logger