changeset 49993:a40d0a292281

* nnfolder.el (nnfolder-request-accept-article): Don't use mail-header-unfold-field. * imap.el (imap-ssl-open): Don't depend on ssl.el. * nntp.el (nntp-open-ssl-stream): Don't depend on ssl.el.
author ShengHuo ZHU <zsh@cs.rochester.edu>
date Fri, 28 Feb 2003 13:36:11 +0000
parents bc05ebcc75dc
children dcf78d005b68
files lisp/gnus/ChangeLog lisp/gnus/imap.el lisp/gnus/nnfolder.el lisp/gnus/nntp.el
diffstat 4 files changed, 47 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Fri Feb 28 02:09:19 2003 +0000
+++ b/lisp/gnus/ChangeLog	Fri Feb 28 13:36:11 2003 +0000
@@ -1,3 +1,11 @@
+2003-02-28  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+	* nnfolder.el (nnfolder-request-accept-article): Don't use
+	mail-header-unfold-field.
+
+	* imap.el (imap-ssl-open): Don't depend on ssl.el.
+	* nntp.el (nntp-open-ssl-stream): Don't depend on ssl.el.
+
 2003-02-18  Juanma Barranquero  <lektu@terra.es>
 
 	* ietf-drums.el (ietf-drums-remove-whitespace): Fix character
--- a/lisp/gnus/imap.el	Fri Feb 28 02:09:19 2003 +0000
+++ b/lisp/gnus/imap.el	Fri Feb 28 13:36:11 2003 +0000
@@ -1,5 +1,5 @@
 ;;; imap.el --- imap library
-;; Copyright (C) 1998, 1999, 2000, 2002
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <jas@pdc.kth.se>
@@ -138,7 +138,6 @@
 
 (eval-when-compile (require 'cl))
 (eval-and-compile
-  (autoload 'open-ssl-stream "ssl")
   (autoload 'base64-decode-string "base64")
   (autoload 'base64-encode-string "base64")
   (autoload 'starttls-open-stream "starttls")
@@ -188,10 +187,10 @@
   :group 'imap
   :type '(repeat string))
 
-(defcustom imap-ssl-program '("openssl s_client -ssl3 -connect %s:%p"
-			      "openssl s_client -ssl2 -connect %s:%p"
-			      "s_client -ssl3 -connect %s:%p"
-			      "s_client -ssl2 -connect %s:%p")
+(defcustom imap-ssl-program '("openssl s_client -quiet -ssl3 -connect %s:%p"
+			      "openssl s_client -quiet -ssl2 -connect %s:%p"
+			      "s_client -quiet -ssl3 -connect %s:%p"
+			      "s_client -quiet -ssl2 -connect %s:%p")
   "A string, or list of strings, containing commands for SSL connections.
 Within a string, %s is replaced with the server address and %p with
 port number on server.  The program should accept IMAP commands on
@@ -569,18 +568,22 @@
       (let* ((port (or port imap-default-ssl-port))
 	     (coding-system-for-read imap-coding-system-for-read)
 	     (coding-system-for-write imap-coding-system-for-write)
-	     (ssl-program-name shell-file-name)
-	     (ssl-program-arguments
-	      (list shell-command-switch
-		    (format-spec cmd (format-spec-make
-				      ?s server
-				      ?p (number-to-string port)))))
+	     (process-connection-type nil)
 	     process)
-	(when (setq process (ignore-errors (open-ssl-stream
-					    name buffer server port)))
+	(when (progn
+		(setq process (start-process 
+			       name buffer shell-file-name
+			       shell-command-switch
+			       (format-spec cmd 
+					    (format-spec-make
+					     ?s server
+					     ?p (number-to-string port)))))
+		(process-kill-without-query process)
+		process)
 	  (with-current-buffer buffer
 	    (goto-char (point-min))
 	    (while (and (memq (process-status process) '(open run))
+			(set-buffer buffer) ;; XXX "blue moon" nntp.el bug
 			(goto-char (point-max))
 			(forward-line -1)
 			(not (imap-parse-greeting)))
--- a/lisp/gnus/nnfolder.el	Fri Feb 28 02:09:19 2003 +0000
+++ b/lisp/gnus/nnfolder.el	Fri Feb 28 13:36:11 2003 +0000
@@ -411,7 +411,9 @@
 	  result art-group)
       (goto-char (point-min))
       (when (looking-at "X-From-Line: ")
-	(replace-match "From "))
+	(replace-match "From ")
+	(while (progn (forward-line) (looking-at "[ \t]"))
+	  (delete-char -1)))
       (and
        (nnfolder-request-list)
        (save-excursion
--- a/lisp/gnus/nntp.el	Fri Feb 28 02:09:19 2003 +0000
+++ b/lisp/gnus/nntp.el	Fri Feb 28 13:36:11 2003 +0000
@@ -1,7 +1,7 @@
 ;;; nntp.el --- nntp access for Gnus
+
 ;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996,
-;;        1997, 1998, 2000, 2001, 2002
-;;        Free Software Foundation, Inc.
+;; 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -223,9 +223,15 @@
 (defvar nntp-async-timer nil)
 (defvar nntp-async-process-list nil)
 
+(defvar nntp-ssl-program 
+  "openssl s_client -quiet -ssl3 -connect %s:%p"
+"A string containing commands for SSL connections.
+Within a string, %s is replaced with the server address and %p with
+port number on server.  The program should accept IMAP commands on
+stdin and return responses to stdout.")
+
 (eval-and-compile
-  (autoload 'mail-source-read-passwd "mail-source")
-  (autoload 'open-ssl-stream "ssl"))
+  (autoload 'mail-source-read-passwd "mail-source"))
 
 
 
@@ -921,8 +927,15 @@
   (open-network-stream "nntpd" buffer nntp-address nntp-port-number))
 
 (defun nntp-open-ssl-stream (buffer)
-  (let* ((ssl-program-arguments '("-connect" (concat host ":" service)))
-	 (proc (open-ssl-stream "nntpd" buffer nntp-address nntp-port-number)))
+  (let* ((process-connection-type nil)
+	 (proc (start-process "nntpd" buffer 
+			      shell-file-name
+			      shell-command-switch
+			      (format-spec nntp-ssl-program 
+					   (format-spec-make
+					    ?s nntp-address
+					    ?p nntp-port-number)))))
+    (process-kill-without-query proc)
     (save-excursion
       (set-buffer buffer)
       (nntp-wait-for-string "^\r*20[01]")