emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 c572e1f: Return non-nil from gnutls-available-p u


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 c572e1f: Return non-nil from gnutls-available-p under GnuTLS 2.x
Date: Sun, 5 Nov 2017 10:27:16 -0500 (EST)

branch: emacs-26
commit c572e1f329583d40a6ae1a6cf493aba4a58c08e4
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Return non-nil from gnutls-available-p under GnuTLS 2.x
    
    * doc/misc/emacs-gnutls.texi (Help For Users): Update the
    documentation of 'gnutls-available-p'.
    
    * etc/NEWS (GnuTLS): Mention the change in the value returned by
    'gnutls-available-p'.
    
    * src/gnutls.c (Fgnutls_available_p): Return non-nil when GnuTLS
    2.x is available.  (Bug#29147)
---
 doc/misc/emacs-gnutls.texi | 6 +++++-
 etc/NEWS                   | 4 ++++
 src/gnutls.c               | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi
index 0ad48b0..92846a9 100644
--- a/doc/misc/emacs-gnutls.texi
+++ b/doc/misc/emacs-gnutls.texi
@@ -94,7 +94,11 @@ There's one way to find out if GnuTLS is available, by 
calling
 Zaretskii) in the same directory as Emacs, you should be OK.
 
 @defun gnutls-available-p
-This function returns @code{t} if GnuTLS is available in this instance of 
Emacs.
+This function returns address@hidden if GnuTLS is available in this
+instance of Emacs, @code{nil} otherwise.  If GnuTLS is available, the
+value is a list of GnuTLS capabilities supported by the installed
+GnuTLS library, which depends on the library version.  The meaning of
+the capabilities is documented in the doc string of this function.
 @end defun
 
 Oh, but sometimes things go wrong.  Budgets aren't balanced,
diff --git a/etc/NEWS b/etc/NEWS
index 10e9a7f..9853aa6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1536,6 +1536,10 @@ and 'gnutls-symmetric-decrypt'.
 See the node "(elisp) GnuTLS Cryptography" in the ELisp manual for details.
 
 +++
+** The function 'gnutls-available-p' now returns a list of capabilities
+supported by the GnuTLS library used by Emacs.
+
++++
 ** Emacs now supports records for user-defined types, via the new
 functions 'make-record', 'record', and 'recordp'.  Records are now
 used internally to represent cl-defstruct and defclass instances, for
diff --git a/src/gnutls.c b/src/gnutls.c
index 36f65c4..85cebd0 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -2422,6 +2422,8 @@ GnuTLS AEAD ciphers     : the list will contain 
`AEAD-ciphers'.  */)
 
 #ifdef HAVE_GNUTLS
 
+  capabilities = Fcons (intern("gnutls"), capabilities);
+
 # ifdef HAVE_GNUTLS3
   capabilities = Fcons (intern("gnutls3"), capabilities);
   capabilities = Fcons (intern("digests"), capabilities);



reply via email to

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