From: Heikki Linnakangas Date: Sat, 11 May 2024 15:48:19 +0000 (+0300) Subject: Change ALPN protocol ID to IANA-approved "postgresql" X-Git-Tag: REL_17_BETA1~70 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=407e0b023cdb449dde65fd370c6cc48f5b8a5579;p=postgresql.git Change ALPN protocol ID to IANA-approved "postgresql" "TBD-pgsql" was a placeholder until the IANA registration was approved. Discussion: https://www.postgresql.org/message-id/87jzk2hj2n.fsf%40wibble.ilmari.org Discussion: https://mailarchive.ietf.org/arch/msg/tls-reg-review/9LWPzQfOpbc8dTT7vc9ahNeNaiw/ --- diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 101c676e085..1d32c226d81 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -2949,7 +2949,7 @@ const char *PQsslAttribute(const PGconn *conn, const char *attribute_name); Application protocol selected by the TLS Application-Layer Protocol Negotiation (ALPN) extension. The only protocol - supported by libpq is TBD-pgsql, so this is + supported by libpq is postgresql, so this is mainly useful for checking whether the server supported ALPN or not. Empty string if ALPN was not used. diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index aaaf131edd7..1b27d0a5479 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -1564,7 +1564,7 @@ SELCT 1/0; required to use the ALPN extension defined by RFC 7301 to protect against protocol confusion attacks. - The PostgreSQL protocol is "TBD-pgsql" as + The PostgreSQL protocol is "postgresql" as registered at IANA TLS ALPN Protocol IDs registry. diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index fb93c820530..527735e3dba 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -156,8 +156,8 @@ typedef struct CancelRequestPacket * * The #define can be used to initialize a char[] vector to use directly in the API */ -#define PG_ALPN_PROTOCOL "TBD-pgsql" -#define PG_ALPN_PROTOCOL_VECTOR { 9, 'T','B','D','-','p','g','s','q','l' } +#define PG_ALPN_PROTOCOL "postgresql" +#define PG_ALPN_PROTOCOL_VECTOR { 10, 'p','o','s','t','g','r','e','s','q','l' } /* * A client can also start by sending a SSL or GSSAPI negotiation request to