aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2005-06-02 11:34:00 +0000
committerMiles Bader2005-06-02 11:34:00 +0000
commit0f69d598bc0b95891ee020f6ff2268e2ec981b5f (patch)
tree159b6886c00d1943af000edda92dbe4a5dec05ab
parenta2e6384d44559b23890969a21d579bf35cd85d88 (diff)
downloademacs-0f69d598bc0b95891ee020f6ff2268e2ec981b5f.tar.gz
emacs-0f69d598bc0b95891ee020f6ff2268e2ec981b5f.zip
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-348
Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 79) - Update from CVS 2005-06-02 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/pop3.el (pop3-md5): Run md5 in the binary mode. (pop3-md5-program-args): New variable. * lisp/gnus/starttls.el (starttls-set-process-query-on-exit-flag): Use eval-and-compile.
-rw-r--r--lisp/gnus/ChangeLog8
-rw-r--r--lisp/gnus/pop3.el42
-rw-r--r--lisp/gnus/starttls.el9
3 files changed, 42 insertions, 17 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 089261f108c..83b5e3820e6 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,11 @@
12005-06-02 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * pop3.el (pop3-md5): Run md5 in the binary mode.
4 (pop3-md5-program-args): New variable.
5
6 * starttls.el (starttls-set-process-query-on-exit-flag): Use
7 eval-and-compile.
8
12005-05-31 Katsumi Yamaoka <yamaoka@jpl.org> 92005-05-31 Katsumi Yamaoka <yamaoka@jpl.org>
2 10
3 * gnus-art.el (article-display-x-face): Replace 11 * gnus-art.el (article-display-x-face): Replace
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index 75efaf4e512..637421c46d9 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -1,6 +1,7 @@
1;;; pop3.el --- Post Office Protocol (RFC 1460) interface 1;;; pop3.el --- Post Office Protocol (RFC 1460) interface
2 2
3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005
4;; Free Software Foundation, Inc. 5;; Free Software Foundation, Inc.
5 6
6;; Author: Richard L. Pieri <ratinox@peorth.gweep.net> 7;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
@@ -348,21 +349,36 @@ If NOW, use that time instead."
348 349
349;; AUTHORIZATION STATE 350;; AUTHORIZATION STATE
350 351
352(eval-when-compile
353 (if (not (fboundp 'md5)) ;; Emacs 20
354 (defalias 'md5 'ignore)))
355
351(eval-and-compile 356(eval-and-compile
352 (if (fboundp 'md5) 357 (if (and (fboundp 'md5)
353 (defalias 'pop3-md5 'md5) 358 ;; There might be an incompatible implementation.
359 (condition-case nil
360 (md5 "Check whether the 4th argument is allowed"
361 nil nil 'binary)
362 (error nil)))
363 (defun pop3-md5 (string)
364 (md5 string nil nil 'binary))
354 (defvar pop3-md5-program "md5" 365 (defvar pop3-md5-program "md5"
355 "*Program to encode its input in MD5.") 366 "*Program to encode its input in MD5.
356 367\"openssl\" is a popular alternative; set `pop3-md5-program-args' to
368'(\"md5\") if you use it.")
369 (defvar pop3-md5-program-args nil
370 "*List of arguments passed to `pop3-md5-program'.")
357 (defun pop3-md5 (string) 371 (defun pop3-md5 (string)
358 (with-temp-buffer 372 (let ((default-enable-multibyte-characters t)
359 (insert string) 373 (coding-system-for-write 'binary))
360 (call-process-region (point-min) (point-max) 374 (with-temp-buffer
361 pop3-md5-program 375 (insert string)
362 t (current-buffer) nil) 376 (apply 'call-process-region (point-min) (point-max)
363 ;; The meaningful output is the first 32 characters. 377 pop3-md5-program t (current-buffer) nil
364 ;; Don't return the newline that follows them! 378 pop3-md5-program-args)
365 (buffer-substring (point-min) (+ 32 (point-min))))))) 379 ;; The meaningful output is the first 32 characters.
380 ;; Don't return the newline that follows them!
381 (buffer-substring (point-min) (+ 32 (point-min))))))))
366 382
367(defun pop3-user (process user) 383(defun pop3-user (process user)
368 "Send USER information to POP3 server." 384 "Send USER information to POP3 server."
diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el
index 7faa3a933a7..ddc91d90d25 100644
--- a/lisp/gnus/starttls.el
+++ b/lisp/gnus/starttls.el
@@ -236,11 +236,12 @@ handshake, or NIL on failure."
236 (starttls-negotiate-gnutls process) 236 (starttls-negotiate-gnutls process)
237 (signal-process (process-id process) 'SIGALRM))) 237 (signal-process (process-id process) 'SIGALRM)))
238 238
239(if (fboundp 'set-process-query-on-exit-flag) 239(eval-and-compile
240 (if (fboundp 'set-process-query-on-exit-flag)
241 (defalias 'starttls-set-process-query-on-exit-flag
242 'set-process-query-on-exit-flag)
240 (defalias 'starttls-set-process-query-on-exit-flag 243 (defalias 'starttls-set-process-query-on-exit-flag
241 'set-process-query-on-exit-flag) 244 'process-kill-without-query)))
242 (defalias 'starttls-set-process-query-on-exit-flag
243 'process-kill-without-query))
244 245
245(defun starttls-open-stream-gnutls (name buffer host service) 246(defun starttls-open-stream-gnutls (name buffer host service)
246 (message "Opening STARTTLS connection to `%s'..." host) 247 (message "Opening STARTTLS connection to `%s'..." host)