mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
psql: Make SSL info display more compact
Remove the bits display, since that can be derived from the cipher suite. Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://www.postgresql.org/message-id/flat/aee28ee7-0ab3-c2e2-5bed-109feb0c089b%40enterprisedb.com
This commit is contained in:
parent
ceb57afd3c
commit
d816f366bc
@ -3667,7 +3667,6 @@ printSSLInfo(void)
|
|||||||
{
|
{
|
||||||
const char *protocol;
|
const char *protocol;
|
||||||
const char *cipher;
|
const char *cipher;
|
||||||
const char *bits;
|
|
||||||
const char *compression;
|
const char *compression;
|
||||||
|
|
||||||
if (!PQsslInUse(pset.db))
|
if (!PQsslInUse(pset.db))
|
||||||
@ -3675,13 +3674,11 @@ printSSLInfo(void)
|
|||||||
|
|
||||||
protocol = PQsslAttribute(pset.db, "protocol");
|
protocol = PQsslAttribute(pset.db, "protocol");
|
||||||
cipher = PQsslAttribute(pset.db, "cipher");
|
cipher = PQsslAttribute(pset.db, "cipher");
|
||||||
bits = PQsslAttribute(pset.db, "key_bits");
|
|
||||||
compression = PQsslAttribute(pset.db, "compression");
|
compression = PQsslAttribute(pset.db, "compression");
|
||||||
|
|
||||||
printf(_("SSL connection (protocol: %s, cipher: %s, bits: %s, compression: %s)\n"),
|
printf(_("SSL connection (protocol: %s, cipher: %s, compression: %s)\n"),
|
||||||
protocol ? protocol : _("unknown"),
|
protocol ? protocol : _("unknown"),
|
||||||
cipher ? cipher : _("unknown"),
|
cipher ? cipher : _("unknown"),
|
||||||
bits ? bits : _("unknown"),
|
|
||||||
(compression && strcmp(compression, "off") != 0) ? _("on") : _("off"));
|
(compression && strcmp(compression, "off") != 0) ? _("on") : _("off"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user