From 5a47419a7e202f1a70d9dbfcff90edb99ee8d42a Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Mon, 22 Jan 2024 13:25:29 +0000 Subject: [PATCH] fix: enable SNI --- src/pq/connection.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pq/connection.cr b/src/pq/connection.cr index 47a45b56..3b761b1a 100644 --- a/src/pq/connection.cr +++ b/src/pq/connection.cr @@ -56,7 +56,7 @@ module PQ if sslrootcert = @conninfo.sslrootcert ctx.ca_certificates = sslrootcert end - @soc = OpenSSL::SSL::Socket::Client.new(@soc, context: ctx, sync_close: true) + @soc = OpenSSL::SSL::Socket::Client.new(@soc, context: ctx, sync_close: true, hostname: @conninfo.host) end if @conninfo.sslmode == :require && !@soc.is_a?(OpenSSL::SSL::Socket::Client)