summaryrefslogtreecommitdiff
path: root/src/gnutls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnutls.c')
-rw-r--r--src/gnutls.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gnutls.c b/src/gnutls.c
index a0de0238c47..7f0aaf85a41 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -2790,6 +2790,10 @@ Any GnuTLS extension with ID up to 100
capabilities = Fcons (intern("gnutls"), capabilities);
+# ifdef HAVE_GNUTLS_EXT__DUMBFW
+ capabilities = Fcons (intern("ClientHello Padding"), capabilities);
+# endif
+
# ifdef HAVE_GNUTLS3
capabilities = Fcons (intern("gnutls3"), capabilities);
capabilities = Fcons (intern("digests"), capabilities);
@@ -2807,16 +2811,14 @@ Any GnuTLS extension with ID up to 100
const char* name = gnutls_ext_get_name(ext);
if (name != NULL)
{
- capabilities = Fcons (intern(name), capabilities);
+ Lisp_Object cap = intern (name);
+ if (NILP (Fmemq (cap, capabilities)))
+ capabilities = Fcons (cap, capabilities);
}
}
# endif
# endif /* HAVE_GNUTLS3 */
-# ifdef HAVE_GNUTLS_EXT__DUMBFW
- capabilities = Fcons (intern("ClientHello Padding"), capabilities);
-# endif
-
# ifdef WINDOWSNT
Vlibrary_cache = Fcons (Fcons (Qgnutls, capabilities), Vlibrary_cache);
# endif /* WINDOWSNT */