Show SSL encryption information when logging connections
Expand the messages when log_connections is enabled to include the fact that SSL is used and the SSL cipher information. Dr. Andreas Kunert, review by Marko Kreen
This commit is contained in:
parent
9c14dd22e1
commit
4cba1f6bbf
|
@ -230,13 +230,31 @@ PerformAuthentication(Port *port)
|
||||||
if (Log_connections)
|
if (Log_connections)
|
||||||
{
|
{
|
||||||
if (am_walsender)
|
if (am_walsender)
|
||||||
ereport(LOG,
|
{
|
||||||
(errmsg("replication connection authorized: user=%s",
|
#ifdef USE_SSL
|
||||||
port->user_name)));
|
if (port->ssl)
|
||||||
|
ereport(LOG,
|
||||||
|
(errmsg("replication connection authorized: user=%s SSL(protocol: %s, cipher: %s) enabled",
|
||||||
|
port->user_name, SSL_get_version(port->ssl), SSL_get_cipher(port->ssl))));
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
ereport(LOG,
|
||||||
|
(errmsg("replication connection authorized: user=%s",
|
||||||
|
port->user_name)));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ereport(LOG,
|
{
|
||||||
(errmsg("connection authorized: user=%s database=%s",
|
#ifdef USE_SSL
|
||||||
port->user_name, port->database_name)));
|
if (port->ssl)
|
||||||
|
ereport(LOG,
|
||||||
|
(errmsg("connection authorized: user=%s database=%s SSL(protocol: %s, cipher: %s) enabled",
|
||||||
|
port->user_name, port->database_name, SSL_get_version(port->ssl), SSL_get_cipher(port->ssl))));
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
ereport(LOG,
|
||||||
|
(errmsg("connection authorized: user=%s database=%s",
|
||||||
|
port->user_name, port->database_name)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_ps_display("startup", false);
|
set_ps_display("startup", false);
|
||||||
|
|
Loading…
Reference in New Issue