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

Commitc93bf8c

Browse files
committed
Include SSL compression status in psql banner and connection logging
Both the psql banner and the connection logging already includedSSL status, cipher and bitlength, this adds the information aboutcompression being on or off.
1 parentd90ad5d commitc93bf8c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

‎src/backend/utils/init/postinit.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,9 @@ PerformAuthentication(Port *port)
234234
#ifdefUSE_SSL
235235
if (port->ssl)
236236
ereport(LOG,
237-
(errmsg("replication connection authorized: user=%s SSL enabled (protocol=%s, cipher=%s)",
238-
port->user_name,SSL_get_version(port->ssl),SSL_get_cipher(port->ssl))));
237+
(errmsg("replication connection authorized: user=%s SSL enabled (protocol=%s, cipher=%s, compression=%s)",
238+
port->user_name,SSL_get_version(port->ssl),SSL_get_cipher(port->ssl),
239+
SSL_get_current_compression(port->ssl) ?_("on") :_("off"))));
239240
else
240241
#endif
241242
ereport(LOG,
@@ -247,8 +248,9 @@ PerformAuthentication(Port *port)
247248
#ifdefUSE_SSL
248249
if (port->ssl)
249250
ereport(LOG,
250-
(errmsg("connection authorized: user=%s database=%s SSL enabled (protocol=%s, cipher=%s)",
251-
port->user_name,port->database_name,SSL_get_version(port->ssl),SSL_get_cipher(port->ssl))));
251+
(errmsg("connection authorized: user=%s database=%s SSL enabled (protocol=%s, cipher=%s, compression=%s)",
252+
port->user_name,port->database_name,SSL_get_version(port->ssl),SSL_get_cipher(port->ssl),
253+
SSL_get_current_compression(port->ssl) ?_("on") :_("off"))));
252254
else
253255
#endif
254256
ereport(LOG,

‎src/bin/psql/command.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,8 +1800,9 @@ printSSLInfo(void)
18001800
return;/* no SSL */
18011801

18021802
SSL_get_cipher_bits(ssl,&sslbits);
1803-
printf(_("SSL connection (protocol: %s, cipher: %s, bits: %d)\n"),
1804-
SSL_get_version(ssl),SSL_get_cipher(ssl),sslbits);
1803+
printf(_("SSL connection (protocol: %s, cipher: %s, bits: %d, compression: %s)\n"),
1804+
SSL_get_version(ssl),SSL_get_cipher(ssl),sslbits,
1805+
SSL_get_current_compression(ssl) ?_("on") :_("off"));
18051806
#else
18061807

18071808
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp