diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2022-11-03 14:41:28 +0100 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2022-11-03 14:43:27 +0100 |
commit | 8b8038494ce8354a3e2cfffebba40dbd1328ebb9 (patch) | |
tree | d0edcf5b5cf6917c89bdf64fd27a7a8470756741 | |
parent | d8bef573d6451d02a996d556dcd33b8e978b23d7 (diff) | |
download | emacs-8b8038494ce8354a3e2cfffebba40dbd1328ebb9.tar.gz |
* src/gnutls.c (Fgnutls_available_p): Avoid duplicating capabilities.
-rw-r--r-- | src/gnutls.c | 12 |
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 */ |