diff options
| -rw-r--r-- | src/gnutls.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gnutls.c b/src/gnutls.c index 9fbaea2f405..e406d665190 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -1854,12 +1854,17 @@ The alist key is the cipher name. */) | |||
| 1854 | 1854 | ||
| 1855 | #ifdef HAVE_GNUTLS3_CIPHER | 1855 | #ifdef HAVE_GNUTLS3_CIPHER |
| 1856 | const gnutls_cipher_algorithm_t *gciphers = gnutls_cipher_list (); | 1856 | const gnutls_cipher_algorithm_t *gciphers = gnutls_cipher_list (); |
| 1857 | for (ptrdiff_t pos = 0; gciphers[pos] != GNUTLS_CIPHER_NULL; pos++) | 1857 | for (ptrdiff_t pos = 0; gciphers[pos] != 0; pos++) |
| 1858 | { | 1858 | { |
| 1859 | gnutls_cipher_algorithm_t gca = gciphers[pos]; | 1859 | gnutls_cipher_algorithm_t gca = gciphers[pos]; |
| 1860 | if (gca == GNUTLS_CIPHER_NULL) | ||
| 1861 | continue; | ||
| 1862 | char const *cipher_name = gnutls_cipher_get_name (gca); | ||
| 1863 | if (!cipher_name) | ||
| 1864 | continue; | ||
| 1860 | 1865 | ||
| 1861 | /* A symbol representing the GnuTLS cipher. */ | 1866 | /* A symbol representing the GnuTLS cipher. */ |
| 1862 | Lisp_Object cipher_symbol = intern (gnutls_cipher_get_name (gca)); | 1867 | Lisp_Object cipher_symbol = intern (cipher_name); |
| 1863 | 1868 | ||
| 1864 | ptrdiff_t cipher_tag_size = gnutls_cipher_get_tag_size (gca); | 1869 | ptrdiff_t cipher_tag_size = gnutls_cipher_get_tag_size (gca); |
| 1865 | 1870 | ||