mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Send ALPN in TLS handshake, require it in direct SSL connections
libpq now always tries to send ALPN. With the traditional negotiated SSL connections, the server accepts the ALPN, and refuses the connection if it's not what we expect, but connecting without ALPN is still OK. With the new direct SSL connections, ALPN is mandatory. NOTE: This uses "TBD-pgsql" as the protocol ID. We must register a proper one with IANA before the release! Author: Greg Stark, Heikki Linnakangas Reviewed-by: Matthias van de Meent, Jacob Champion
This commit is contained in:
@ -2944,6 +2944,18 @@ const char *PQsslAttribute(const PGconn *conn, const char *attribute_name);
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>alpn</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Application protocol selected by the TLS Application-Layer
|
||||
Protocol Negotiation (ALPN) extension. The only protocol
|
||||
supported by libpq is <literal>TBD-pgsql</literal>, so this is
|
||||
mainly useful for checking whether the server supported ALPN or
|
||||
not. Empty string if ALPN was not used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
|
Reference in New Issue
Block a user