aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTed Zlatanov2017-12-19 12:43:56 -0500
committerTed Zlatanov2017-12-19 12:43:56 -0500
commit21a212f9e256a05a0fc67260d338d612cba77266 (patch)
treec9591613b9122827a7d657adddbc672a48006c16 /src
parent936136ecab567a2ca320df080595a5fd2693b4c3 (diff)
downloademacs-21a212f9e256a05a0fc67260d338d612cba77266.tar.gz
emacs-21a212f9e256a05a0fc67260d338d612cba77266.zip
Collect GnuTLS extensions and use them to set %DUMBFW if supported
* lisp/net/gnutls.el (gnutls-boot-parameters): Use it to set %DUMBFW only when it's supported as "ClientHello Padding" (Bug#25061). * src/gnutls.c (Fgnutls_available_p): Get extension names and put them in the GnuTLS capabilities, using a hard-coded limit of 100 since GnuTLS MAX_EXT_TYPES is not exported.
Diffstat (limited to 'src')
-rw-r--r--src/gnutls.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gnutls.c b/src/gnutls.c
index 4622011bc10..8db201ae834 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -2415,7 +2415,10 @@ GnuTLS 3 or higher : the list will contain `gnutls3'.
2415GnuTLS MACs : the list will contain `macs'. 2415GnuTLS MACs : the list will contain `macs'.
2416GnuTLS digests : the list will contain `digests'. 2416GnuTLS digests : the list will contain `digests'.
2417GnuTLS symmetric ciphers: the list will contain `ciphers'. 2417GnuTLS symmetric ciphers: the list will contain `ciphers'.
2418GnuTLS AEAD ciphers : the list will contain `AEAD-ciphers'. */) 2418GnuTLS AEAD ciphers : the list will contain `AEAD-ciphers'.
2419%DUMBFW : the list will contain `ClientHello\ Padding'.
2420Any GnuTLS extension with ID up to 100
2421 : the list will contain its name. */)
2419 (void) 2422 (void)
2420{ 2423{
2421 Lisp_Object capabilities = Qnil; 2424 Lisp_Object capabilities = Qnil;
@@ -2436,6 +2439,15 @@ GnuTLS AEAD ciphers : the list will contain `AEAD-ciphers'. */)
2436 capabilities = Fcons (intern("macs"), capabilities); 2439 capabilities = Fcons (intern("macs"), capabilities);
2437# endif /* HAVE_GNUTLS3 */ 2440# endif /* HAVE_GNUTLS3 */
2438 2441
2442 for (unsigned int ext=0; ext < 100; ext++)
2443 {
2444 const char* name = gnutls_ext_get_name(ext);
2445 if (name != NULL)
2446 {
2447 capabilities = Fcons (intern(name), capabilities);
2448 }
2449 }
2450
2439# ifdef WINDOWSNT 2451# ifdef WINDOWSNT
2440 Lisp_Object found = Fassq (Qgnutls, Vlibrary_cache); 2452 Lisp_Object found = Fassq (Qgnutls, Vlibrary_cache);
2441 if (CONSP (found)) 2453 if (CONSP (found))