Closed ghost closed 3 years ago
@leafo @ttfkam can you take a look?
@leafo @ttfkam any updates?
@leafo updated the init.moon with the changes too
Thanks for the patch, sorry I wasn't able to get it merged sooner. New version of pgmoon going out shortly.
It seems like the
ssl_version
parameter is needed by theluasec_opts
table in order to do properly do the SSL handshake: https://github.com/leafo/pgmoon/blob/v1.11.0/pgmoon/init.lua#L589Otherwise we would get an error like the following when calling
pg:connect()
to a server that accepts only TLS 1.2:Since the default is TLS 1.1: https://github.com/leafo/pgmoon/blob/v1.11.0/pgmoon/socket.lua#L52
With the introduction of version 12.x of Postgres, it gives you the ability to set the min and max TLS version.
ssl_min_protocol_version: https://www.postgresql.org/docs/12/runtime-config-connection.html#GUC-SSL-MIN-PROTOCOL-VERSION
ssl_max_protocol_version: https://www.postgresql.org/docs/12/runtime-config-connection.html#GUC-SSL-MAX-PROTOCOL-VERSION
So if one sets
ssl_min_protocol_version
toTLSv1.2
the above error will be thrown.