libpq: If ALPN is not used, make PQsslAttribute(conn, "alpn") == ""
authorHeikki Linnakangas
Mon, 29 Apr 2024 09:26:46 +0000 (12:26 +0300)
committerHeikki Linnakangas
Mon, 29 Apr 2024 09:26:46 +0000 (12:26 +0300)
commit3c184092651b0b15ca1207c154ab3fd055e1e9fe
treee153b3c8c9af32ab912e11c2539d61998724f5c3
parent592a2283721f7143999364ef487f2b4993f5161d
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/[email protected]
src/bin/psql/command.c
src/interfaces/libpq/fe-secure-openssl.c