emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 583995c: GnuTLS HMAC and symmetric cipher support


From: Glenn Morris
Subject: Re: master 583995c: GnuTLS HMAC and symmetric cipher support
Date: Mon, 17 Jul 2017 22:33:23 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Paul Eggert wrote:

> looks only at GnuTLS cipher IDs returned by gnutls_cipher_list, and
> GNUTLS_CIPHER_UNKNOWN is not one of those cipher IDs.

I feel like you've missed the first half of the discussion, so I'll
summarize it:

Since 583995c, make check on hydra crashes when loading the gnutls tests.
It uses gnutls 3.2.21. I installed that on my rhel7 system (with
--disable-non-suiteb-curves) and reproduced the crash. The backtrace is
at http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00716.html .

Specifically, I find it crashes because gnutls_cipher_list returns a list
containing GNUTLS_CIPHER_UNKNOWN.

The following patch fixes it for me:

*** /tmp/uOhC3f_gnutls.c        2017-07-17 19:32:32.851361998 -0700
--- src/gnutls.c        2017-07-17 12:03:27.514906186 -0700
***************
*** 1857,1870 ****
    for (ptrdiff_t pos = 0; gciphers[pos] != GNUTLS_CIPHER_NULL; pos++)
      {
        gnutls_cipher_algorithm_t gca = gciphers[pos];
  
        /* A symbol representing the GnuTLS cipher.  */
!       Lisp_Object cipher_symbol = intern (gnutls_cipher_get_name (gca));
  
!       ptrdiff_t cipher_tag_size = gnutls_cipher_get_tag_size (gca);
  
!       Lisp_Object cp
!       = listn (CONSTYPE_HEAP, 15, cipher_symbol,
                 QCcipher_id, make_number (gca),
                 QCtype, Qgnutls_type_cipher,
                 QCcipher_aead_capable, cipher_tag_size == 0 ? Qnil : Qt,
--- 1857,1877 ----
    for (ptrdiff_t pos = 0; gciphers[pos] != GNUTLS_CIPHER_NULL; pos++)
      {
        gnutls_cipher_algorithm_t gca = gciphers[pos];
+       const char *cipher_name;
+       Lisp_Object cipher_symbol, cp;
+       ptrdiff_t cipher_tag_size;
+ 
+       cipher_name = gnutls_cipher_get_name (gca);
+ 
+       if (! cipher_name)
+         continue;
  
        /* A symbol representing the GnuTLS cipher.  */
!       cipher_symbol = intern (cipher_name);
  
!       cipher_tag_size = gnutls_cipher_get_tag_size (gca);
  
!       cp = listn (CONSTYPE_HEAP, 15, cipher_symbol,
                    QCcipher_id, make_number (gca),
                    QCtype, Qgnutls_type_cipher,
                    QCcipher_aead_capable, cipher_tag_size == 0 ? Qnil : Qt,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]