Mercurial > emacs
diff lisp/gnus/starttls.el @ 67643:1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 169-173)
- Merge from emacs--cvs-trunk--0
- Update from CVS
2005-12-16 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art.el (gnus-signature-separator): Fix custom type.
* lisp/gnus/mm-decode.el (mm-inlined-types): Fix custom type.
(mm-keep-viewer-alive-types): Ditto.
(mm-automatic-display): Ditto.
(mm-attachment-override-types): Ditto.
(mm-inline-override-types): Ditto.
(mm-automatic-external-display): Ditto.
2005-12-12 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art.el (gnus-buttonized-mime-types): Mention addition of
multipart/alternative and add xref to mm-discouraged-alternatives
in doc string.
* lisp/gnus/mm-decode.el (mm-discouraged-alternatives): Add xref to
gnus-buttonized-mime-types in doc string.
2005-12-12 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/rfc2047.el (rfc2047-charset-to-coding-system): Recognize
us-ascii as a MIME charset.
* lisp/gnus/mm-bodies.el (mm-decode-content-transfer-encoding): Protect
against the case where the 2nd arg TYPE is nil.
2005-12-09 Reiner Steib <Reiner.Steib@gmx.de>
* lisp/gnus/gnus-start.el (gnus-no-server-1): Mention
`gnus-level-default-subscribed' in doc string.
2005-11-26 Dave Love <fx@gnu.org>
* lisp/gnus/tls.el (open-tls-stream): Rename arg SERVICE to PORT.
(tls-program, tls-success): Provide openssl alternative.
* lisp/gnus/starttls.el: Doc fixes.
(starttls-open-stream-gnutls, starttls-open-stream): Rename arg
SERVICE to PORT.
2005-12-09 Reiner Steib <Reiner.Steib@gmx.de>
* lisp/gnus/gnus-start.el (gnus-start-draft-setup): Enforce
`gnus-draft-mode' for nndraft:drafts at startup.
* lisp/gnus/gnus.el (gnus-splash): Change custom group.
(gnus-group-get-parameter, gnus-group-parameter-value): Describe
allow-list argument.
* lisp/gnus/gnus-agent.el (gnus-agent-article-alist-save-format): Format doc
string.
2005-12-09 ARISAWA Akihiro <ari@mbf.ocn.ne.jp> (tiny change)
* lisp/gnus/mm-decode.el (mm-display-external): Add lacked cdr.
2005-12-12 Katsumi Yamaoka <yamaoka@jpl.org>
* man/gnus.texi (MIME Commands): Mention addition of
multipart/alternative to gnus-buttonized-mime-types and add xref
to mm-discouraged-alternatives.
* man/emacs-mime.texi (Display Customization): Mention addition of
"image/.*" and add xref to gnus-buttonized-mime-types in the
mm-discouraged-alternatives section.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 17 Dec 2005 21:41:34 +0000 |
parents | fafd692d1e40 |
children | 1077b8039c32 7beb78bc1f8e |
line wrap: on
line diff
--- a/lisp/gnus/starttls.el Sat Dec 17 17:29:36 2005 +0000 +++ b/lisp/gnus/starttls.el Sat Dec 17 21:41:34 2005 +0000 @@ -32,7 +32,7 @@ ;; [RFC 2595] "Using TLS with IMAP, POP3 and ACAP" ;; by Chris Newman <chris.newman@innosoft.com> (1999/06) -;; This file now contain a combination of the two previous +;; This file now contains a combination of the two previous ;; implementations both called "starttls.el". The first one is Daiki ;; Ueno's starttls.el which uses his own "starttls" command line tool, ;; and the second one is Simon Josefsson's starttls.el which uses @@ -44,7 +44,7 @@ ;; both tools installed. It is recommended to use GNUTLS, though, as ;; it performs more verification of the certificates. -;; The GNUTLS support require GNUTLS 0.9.90 (released 2003-10-08) or +;; The GNUTLS support requires GNUTLS 0.9.90 (released 2003-10-08) or ;; later, from <http://www.gnu.org/software/gnutls/>, or "starttls" ;; from <ftp://ftp.opaopa.org/pub/elisp/>. @@ -58,7 +58,7 @@ ;; (message "STARTTLS output:\n%s" (starttls-negotiate tmp)) ;; (process-send-string tmp "EHLO foo\n")) -;; An example run yield the following output: +;; An example run yields the following output: ;; ;; 220 yxa.extundo.com ESMTP Sendmail 8.12.11/8.12.11/Debian-3; Wed, 26 May 2004 19:12:29 +0200; (No UCE/UBE) logging access from: c494102a.s-bi.bostream.se(OK)-c494102a.s-bi.bostream.se [217.215.27.65] ;; 220 2.0.0 Ready to start TLS @@ -146,15 +146,14 @@ (defcustom starttls-extra-args nil "Extra arguments to `starttls-program'. -This program is used when the `starttls' command is used, -i.e. when `starttls-use-gnutls' is nil." +These apply when the `starttls' command is used, i.e. when +`starttls-use-gnutls' is nil." :type '(repeat string) :group 'starttls) (defcustom starttls-extra-arguments nil "Extra arguments to `starttls-program'. -This program is used when GNUTLS is used, i.e. when -`starttls-use-gnutls' is non-nil. +These apply when GNUTLS is used, i.e. when `starttls-use-gnutls' is non-nil. For example, non-TLS compliant servers may require '(\"--protocols\" \"ssl3\"). Invoke \"gnutls-cli --help\" to @@ -172,7 +171,7 @@ (defcustom starttls-connect "- Simple Client Mode:\n\n" "*Regular expression indicating successful connection. The default is what GNUTLS's \"gnutls-cli\" outputs." - ;; GNUTLS cli.c:main() print this string when it is starting to run + ;; GNUTLS cli.c:main() prints this string when it is starting to run ;; in the application read/write phase. If the logic, or the string ;; itself, is modified, this must be updated. :version "22.1" @@ -182,7 +181,7 @@ (defcustom starttls-failure "\\*\\*\\* Handshake has failed" "*Regular expression indicating failed TLS handshake. The default is what GNUTLS's \"gnutls-cli\" outputs." - ;; GNUTLS cli.c:do_handshake() print this string on failure. If the + ;; GNUTLS cli.c:do_handshake() prints this string on failure. If the ;; logic, or the string itself, is modified, this must be updated. :version "22.1" :type 'regexp @@ -200,10 +199,10 @@ :group 'starttls) (defun starttls-negotiate-gnutls (process) - "Negotiate TLS on process opened by `open-starttls-stream'. -This should typically only be done once. It typically return a + "Negotiate TLS on PROCESS opened by `open-starttls-stream'. +This should typically only be done once. It typically returns a multi-line informational message with information about the -handshake, or NIL on failure." +handshake, or nil on failure." (let (buffer info old-max done-ok done-bad) (if (null (setq buffer (process-buffer process))) ;; XXX How to remove/extract the TLS negotiation junk? @@ -243,16 +242,16 @@ (defalias 'starttls-set-process-query-on-exit-flag 'process-kill-without-query))) -(defun starttls-open-stream-gnutls (name buffer host service) +(defun starttls-open-stream-gnutls (name buffer host port) (message "Opening STARTTLS connection to `%s'..." host) (let* (done (old-max (with-current-buffer buffer (point-max))) (process-connection-type starttls-process-connection-type) (process (apply #'start-process name buffer starttls-gnutls-program "-s" host - "-p" (if (integerp service) - (int-to-string service) - service) + "-p" (if (integerp port) + (int-to-string port) + port) starttls-extra-arguments))) (starttls-set-process-query-on-exit-flag process nil) (while (and (processp process) @@ -273,11 +272,11 @@ host (if done "done" "failed")) process)) -(defun starttls-open-stream (name buffer host service) - "Open a TLS connection for a service to a host. -Returns a subprocess-object to represent the connection. +(defun starttls-open-stream (name buffer host port) + "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. -Args are NAME BUFFER HOST SERVICE. +Args are NAME BUFFER HOST PORT. NAME is name for process. It is modified if necessary to make it unique. BUFFER is the buffer (or `buffer-name') to associate with the process. Process output goes at end of that buffer, unless you specify @@ -285,14 +284,15 @@ BUFFER may be also nil, meaning that this process is not associated with any buffer Third arg is name of the host to connect to, or its IP address. -Fourth arg SERVICE is name of the service desired, or an integer -specifying a port number to connect to." +Fourth arg PORT is an integer specifying a port to connect to. +If `starttls-use-gnutls' is nil, this may also be a service name, but +GNUTLS requires a port number." (if starttls-use-gnutls - (starttls-open-stream-gnutls name buffer host service) + (starttls-open-stream-gnutls name buffer host port) (let* ((process-connection-type starttls-process-connection-type) (process (apply #'start-process name buffer starttls-program - host (format "%s" service) + host (format "%s" port) starttls-extra-args))) (starttls-set-process-query-on-exit-flag process nil) process)))