aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-09-29 14:48:29 +0200
committerLars Magne Ingebrigtsen2010-09-29 14:48:29 +0200
commitdf7fcafff05c4002f35e507c65518f4b20ba5382 (patch)
treedff32dbafc674846a125fd1d28a6ea79db90c522 /lisp
parentaf7ef32d8e12d07c4a37df1685d997ac76641dd7 (diff)
downloademacs-df7fcafff05c4002f35e507c65518f4b20ba5382.tar.gz
emacs-df7fcafff05c4002f35e507c65518f4b20ba5382.zip
Make sure all reads/writes to gnutls streams go via the gnutls functions.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/net/gnutls.el16
2 files changed, 9 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 655e4d1b240..44cb82b4c7b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12010-09-29 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * net/gnutls.el (starttls-negotiate): Loop a lot longer.
4
12010-09-29 Glenn Morris <rgm@gnu.org> 52010-09-29 Glenn Morris <rgm@gnu.org>
2 6
3 * calendar/diary-lib.el (diary-list-entries): Use temp buffers when 7 * calendar/diary-lib.el (diary-list-entries): Use temp buffers when
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index 6a2d5aff68f..e1d093ebf79 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -37,7 +37,7 @@
37 :prefix "gnutls-" 37 :prefix "gnutls-"
38 :group 'net-utils) 38 :group 'net-utils)
39 39
40(defcustom gnutls-log-level 2 40(defcustom gnutls-log-level 0
41 "Logging level to be used by `starttls-negotiate' and GnuTLS." 41 "Logging level to be used by `starttls-negotiate' and GnuTLS."
42 :type 'integer 42 :type 'integer
43 :group 'gnutls) 43 :group 'gnutls)
@@ -91,20 +91,14 @@ CREDENTIALS-FILE is a filename with meaning dependent on CREDENTIALS."
91 (error "Could not boot GnuTLS for this process")); 91 (error "Could not boot GnuTLS for this process"));
92 92
93 (let ((ret 'gnutls-e-again) 93 (let ((ret 'gnutls-e-again)
94 (n 25000)) 94 (n 250000))
95 (while (and (not (eq ret t)) 95 (while (and (not (eq ret t))
96 (not (gnutls-error-fatalp ret)) 96 (not (gnutls-error-fatalp ret))
97 (> n 0)) 97 (> n 0))
98 (setq n (1- n)) 98 (setq n (1- n))
99 (setq ret (gnutls-handshake proc)) 99 (setq ret (gnutls-handshake proc)))
100 ) 100 (message "Handshake complete %s." ret))
101 (if (gnutls-errorp ret) 101 proc))
102 (progn
103 (message "Ouch, error return %s (%s)"
104 ret (gnutls-error-string ret))
105 (setq proc nil))
106 (message "Handshake complete %s." ret)))
107 proc))
108 102
109(defun starttls-open-stream (name buffer host service) 103(defun starttls-open-stream (name buffer host service)
110 "Open a TLS connection for a service to a host. 104 "Open a TLS connection for a service to a host.