diff options
author | Gnus developers <ding@gnus.org> | 2010-10-01 00:25:50 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2010-10-01 00:25:50 +0000 |
commit | 6b9588145b7b1cac4e4629f7133bf88f9360c15f (patch) | |
tree | 645c70bb8421365b01dee14dd817d71706524bac /lisp/net | |
parent | 55e572ef8986dec1febac0e6d4581d820a23a9a5 (diff) | |
download | emacs-6b9588145b7b1cac4e4629f7133bf88f9360c15f.tar.gz emacs-6b9588145b7b1cac4e4629f7133bf88f9360c15f.tar.bz2 emacs-6b9588145b7b1cac4e4629f7133bf88f9360c15f.zip |
nnimap.el (nnimap-request-accept-article): Get the Message-ID without the \r.
nnimap.el (nnimap-find-article-by-message-id): Use EXAMINE instead of SELECT to get the message-id.
gnus-art.el, gnus.el, nnimap.el: Fix up make-obsolete-variable declarations throughout.
gnus.texi (Mail Source Specifiers): Remove webmail.el mentions.
mail-source.el: Removed webmail support.
nntp.el (nntp-server-list-active-group): Document.
gnus.texi (NNTP): Document nntp-server-list-active-group.
gnus.texi (Customizing the IMAP Connection): Remove extra quote.
nnimap.el (nnimap-find-article-by-message-id): Really return the article number.
nnimap.el: Add nnimap-split-fancy.
netrc.el (netrc-credentials, netrc-machine): Return the value of the "default" entry.
nnimap.el: Use tls.el exclusively, and not starttls.el at all.
nnimap.el (nnimap-wait-for-connection): Accept the moronic openssl s_client -starttls output, too.
nnrss.el (nnrss-use-local): Add documentation.
message.el (message-ignored-supersedes-headers): Strip Injection-* headers before superseding.
nnimap.el (nnimap-open-connection): Reinstate the auto-upgrade from unencrypted to STARTTLS, if possible.
nnir.el: Use the server names without suffixes.
gnus-sum.el (gnus-summary-show-thread): Skip past invisible text when expanding threads.
gnus-registry.el: Don't follow nnmairix references. Install the nnregistry refer method.
gnus.texi (Spam Package Configuration Examples, SpamOracle): Remove nnimap-split-rule from examples.
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/netrc.el | 32 | ||||
-rw-r--r-- | lisp/net/tls.el | 21 |
2 files changed, 36 insertions, 17 deletions
diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index d76b8cf3a04..ff0b52c2b96 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -131,19 +131,23 @@ Entries without port tokens default to DEFAULTPORT." ;; No machine name matches, so we look for default entries. (while rest (when (assoc "default" (car rest)) - (push (car rest) result)) + (let ((elem (car rest))) + (setq elem (delete (assoc "default" elem) elem)) + (push elem result))) (pop rest))) (when result (setq result (nreverse result)) - (while (and result - (not (netrc-port-equal - (or port defaultport "nntp") - ;; when port is not given in the netrc file, - ;; it should mean "any port" - (or (netrc-get (car result) "port") - defaultport port)))) - (pop result)) - (car result)))) + (if (not port) + (car result) + (while (and result + (not (netrc-port-equal + (or port defaultport "nntp") + ;; when port is not given in the netrc file, + ;; it should mean "any port" + (or (netrc-get (car result) "port") + defaultport port)))) + (pop result)) + (car result))))) (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines ports defaults) "Get the user name or password according to MODE from AUTHINFO-FILE-OR-LIST. @@ -238,9 +242,11 @@ Port specifications will be prioritised in the order they are listed in the PORTS list." (let ((list (netrc-parse)) found) - (while (and ports - (not found)) - (setq found (netrc-machine list machine (pop ports)))) + (if (not ports) + (setq found (netrc-machine list machine)) + (while (and ports + (not found)) + (setq found (netrc-machine list machine (pop ports))))) (when found (list (cdr (assoc "login" found)) (cdr (assoc "password" found)))))) diff --git a/lisp/net/tls.el b/lisp/net/tls.el index d4fa8c2e73c..ad0768968e5 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -75,9 +75,14 @@ and `gnutls-cli' (version 2.0.1) output." :type 'regexp :group 'tls) -(defcustom tls-program '("gnutls-cli -p %p %h" - "gnutls-cli -p %p %h --protocols ssl3" - "openssl s_client -connect %h:%p -no_ssl2 -ign_eof") +(defvar tls-starttls-switches + '(("gnutls-cli" "-s") + ("openssl" "-starttls imap")) + "Alist of programs and the switches necessary to get starttls behaviour.") + +(defcustom tls-program '("gnutls-cli %s -p %p %h" + "gnutls-cli %s -p %p %h --protocols ssl3" + "openssl s_client %s -connect %h:%p -no_ssl2 -ign_eof") "List of strings containing commands to start TLS stream to a host. Each entry in the list is tried until a connection is successful. %h is replaced with server hostname, %p with port to connect to. @@ -199,7 +204,7 @@ Used by `tls-certificate-information'." (push (cons (match-string 1) (match-string 2)) vals)) (nreverse vals)))))) -(defun open-tls-stream (name buffer host port) +(defun open-tls-stream (name buffer host port &optional starttlsp) "Open a TLS connection for a port to a host. Returns a subprocess-object to represent the connection. Input and output work as for subprocesses; `delete-process' closes it. @@ -229,6 +234,9 @@ Fourth arg PORT is an integer specifying a port to connect to." (format-spec cmd (format-spec-make + ?s (if starttlsp + (tls-find-starttls-argument cmd) + "") ?h host ?p (if (integerp port) (int-to-string port) @@ -300,6 +308,11 @@ match `%s'. Connect anyway? " host)))))) (kill-buffer buffer)) done)) +(defun tls-find-starttls-argument (command) + (let ((command (car (split-string command)))) + (or (cadr (assoc command tls-starttls-switches)) + ""))) + (provide 'tls) ;;; tls.el ends here |