From: czkmt Date: Mon, 27 Dec 1999 16:09:15 +0000 (+0000) Subject: (pop3-ssl-program-arguments): Add "s_client". X-Git-Tag: t-gnus-6_14_0-14~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=601afe74037d0b32ce36aa852a157c34cf071496;p=elisp%2Fgnus.git- (pop3-ssl-program-arguments): Add "s_client". (pop3-open-ssl-stream-1): Bind `ssl-program-name' because its value depends on the version of ssl.el. (pop3-open-ssl-stream): If `system-type' is windows-nt, bind `coding-system-for-read' to raw-text-dos, else bind it to binary. --- diff --git a/lisp/pop3.el b/lisp/pop3.el index 4885f61..b544159 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -91,7 +91,7 @@ Nil means no, t means yes, not-nil-or-t means yet to be determined.") (autoload 'starttls-negotiate "starttls")) (defvar pop3-ssl-program-arguments - '("-quiet") + '("s_client" "-quiet") "Arguments to be passed to the program `pop3-ssl-program-name'.") (defun pop3-progress-message (format percent &rest args) @@ -182,7 +182,13 @@ Argument PORT specifies connecting port." process)) (defun pop3-open-ssl-stream-1 (name buffer host service extra-arg) - (let* ((ssl-program-arguments + (require 'path-util) + (let* ((ssl-program-name + (cond ((exec-installed-p "openssl") + "openssl") + (t + "ssleay"))) + (ssl-program-arguments `(,@pop3-ssl-program-arguments ,extra-arg "-connect" ,(format "%s:%d" host service))) (process (open-ssl-stream name buffer host service))) @@ -203,9 +209,16 @@ Argument PORT specifies connecting port." "Open a SSL connection for a service to a host. Returns a subprocess-object to represent the connection. Args are NAME BUFFER HOST SERVICE." - (as-binary-process - (or (pop3-open-ssl-stream-1 name buffer host service "-ssl3") - (pop3-open-ssl-stream-1 name buffer host service "-ssl2")))) + (cond ((eq system-type 'windows-nt) + (let (selective-display + (coding-system-for-write 'binary) + (coding-system-for-read 'raw-text-dos)) + (or (pop3-open-ssl-stream-1 name buffer host service "-ssl3") + (pop3-open-ssl-stream-1 name buffer host service "-ssl2")))) + (t + (as-binary-process + (or (pop3-open-ssl-stream-1 name buffer host service "-ssl3") + (pop3-open-ssl-stream-1 name buffer host service "-ssl2")))))) (defun pop3-open-tls-stream (name buffer host service) "Open a TLSv1 connection for a service to a host.