1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

libpq: If ALPN is not used, make PQsslAttribute(conn, "alpn") == ""

The documentation says that PQsslAttribute(conn, "alpn") returns an
empty string if ALPN is not used, but the code actually returned
NULL. Fix the code to match the documentation.

Reported-by: Michael Paquier
Discussion: https://www.postgresql.org/message-id/ZideNHji0G4gxmc3@paquier.xyz
This commit is contained in:
Heikki Linnakangas
2024-04-29 12:26:46 +03:00
parent 592a228372
commit 3c18409265
2 changed files with 2 additions and 2 deletions

View File

@ -3896,7 +3896,7 @@ printSSLInfo(void)
protocol ? protocol : _("unknown"),
cipher ? cipher : _("unknown"),
(compression && strcmp(compression, "off") != 0) ? _("on") : _("off"),
alpn ? alpn : _("none"));
(alpn && alpn[0] != '\0') ? alpn : _("none"));
}
/*