]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Shim for renaming of GNUTLS_NO_EXTENSIONS in GnuTLS v3.8.1
authorDaniel Lenski <dlenski@gmail.com>
Tue, 22 Aug 2023 19:02:19 +0000 (12:02 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Sat, 2 Sep 2023 05:37:28 +0000 (22:37 -0700)
The constant `GNUTLS_NO_EXTENSIONS` was renamed in
https://gitlab.com/gnutls/gnutls/-/commit/a7c4a04e (released in v3.8.1), and
then a backwards-compatibility shim was belatedly added in
https://gitlab.com/gnutls/gnutls/-/commit/abfa8634, which has not yet been
released.

We need to re-add the constant ourselves in order to build correctly with
GnuTLS v3.8.1.  This should fix
https://gitlab.com/openconnect/openconnect/-/issues/650.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
gnutls-dtls.c

index 3fd78e958af72cd6ca3a3bb8dfc7a63cb57837f2..50a4bb4efcca2d6caa506242701857f427b9113f 100644 (file)
 # define GNUTLS_CIPHER_CHACHA20_POLY1305 23
 #endif
 
+#if GNUTLS_VERSION_NUMBER >= 0x030801 && !defined(GNUTLS_NO_EXTENSIONS)
+/* XX: GNUTLS_NO_EXTENSIONS was renamed in GnuTLS v3.8.1. A
+ * backwards-compatibility shim was added in a subsequent commit, but
+ * not yet released.
+ */
+# define GNUTLS_NO_EXTENSIONS GNUTLS_NO_DEFAULT_EXTENSIONS
+#endif
+
 /* sets the DTLS MTU and returns the actual tunnel MTU */
 unsigned dtls_set_mtu(struct openconnect_info *vpninfo, unsigned mtu)
 {