Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit512f4ca

Browse files
Fix sslsni connparam boolean check
The check for sslsni only checked for existence of the parameterbut not for the actual value of the param. This meant that theSNI extension was always turned on. Fix by inspecting the valueof sslsni and only activate the SNI extension iff sslsni has beenenabled. Also update the docs to be more in line with how otherboolean params are documented.Backpatch to 14 where sslsni was first implemented.Reviewed-by: Tom LaneBackpatch-through: 14, where sslni was added
1 parent37450f2 commit512f4ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎doc/src/sgml/libpq.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
17821782
<term><literal>sslsni</literal><indexterm><primary>Server Name Indication</primary></indexterm></term>
17831783
<listitem>
17841784
<para>
1785-
Bydefault, libpq sets the TLS extension <quote>Server Name
1785+
If set to 1 (default), libpq sets the TLS extension <quote>Server Name
17861786
Indication</quote> (<acronym>SNI</acronym>) on SSL-enabled connections.
17871787
By setting this parameter to 0, this is turned off.
17881788
</para>

‎src/interfaces/libpq/fe-secure-openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ initialize_SSL(PGconn *conn)
10921092
* Per RFC 6066, do not set it if the host is a literal IP address (IPv4
10931093
* or IPv6).
10941094
*/
1095-
if (conn->sslsni&&conn->sslsni[0])
1095+
if (conn->sslsni&&conn->sslsni[0]=='1')
10961096
{
10971097
constchar*host=conn->connhost[conn->whichhost].host;
10981098

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp