summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2010-09-27 18:44:31 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2010-09-27 18:44:31 +0200
commit8ed70bf3167e37c8c15fb3d3286dfb1eb696a85a (patch)
tree6a774f238b22a7bfe1dae8477d02c91907c63a42 /lisp
parentbedf4aabcfdeeb65a8e6050b1f192cbd679a4172 (diff)
downloademacs-8ed70bf3167e37c8c15fb3d3286dfb1eb696a85a.tar.gz
Add gnutls logging and clean up various gnutls bits.
From: Teodor Zlatanov <tzz@lifelogs.com>
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/gnutls.el14
2 files changed, 19 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3d66ee0984c..a19c80c0d1b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-27 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * net/gnutls.el (gnutls, gnutls-log-level): Add group and custom
+ variable.
+ (starttls-negotiate): Use it.
+
2010-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/gnutls.el (starttls-negotiate): Stop looping when we get a t
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index b393d237d90..6a2d5aff68f 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -32,6 +32,16 @@
;;; Code:
+(defgroup gnutls nil
+ "Emacs interface to the GnuTLS library."
+ :prefix "gnutls-"
+ :group 'net-utils)
+
+(defcustom gnutls-log-level 2
+ "Logging level to be used by `starttls-negotiate' and GnuTLS."
+ :type 'integer
+ :group 'gnutls)
+
(defun open-ssl-stream (name buffer host service)
"Open a SSL connection for a service to a host.
Returns a subprocess-object to represent the connection.
@@ -72,7 +82,9 @@ CREDENTIALS-FILE is a filename with meaning dependent on CREDENTIALS."
ret)
(gnutls-message-maybe
- (setq ret (gnutls-boot proc priority-string credentials credentials-file))
+ (setq ret (gnutls-boot proc priority-string
+ credentials credentials-file
+ nil nil gnutls-log-level))
"boot: %s")
(when (gnutls-errorp ret)