aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Josefsson2004-10-11 18:42:18 +0000
committerSimon Josefsson2004-10-11 18:42:18 +0000
commite8620cb6ee95b0649794ce977d65d1fb6b5d136a (patch)
tree85c06cd173ddeb767ad0b396eae7b4375f1dcbe6
parent98337d2babdd7d13e02a5cc66ee2e727b6f42b4e (diff)
downloademacs-e8620cb6ee95b0649794ce977d65d1fb6b5d136a.tar.gz
emacs-e8620cb6ee95b0649794ce977d65d1fb6b5d136a.zip
(smtpmail-open-stream): Look for
starttls-gnutls-program instead of starttls-program iff starttls-use-gnutls is non-nil. (smtpmail-open-stream): Don't overwrite user settings of starttls-extra-arguments and starttls-extra-args.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/mail/smtpmail.el32
2 files changed, 27 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 267307ed395..c050e2cd682 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12004-10-11 Simon Josefsson <jas@extundo.com>
2
3 * mail/smtpmail.el (smtpmail-open-stream): Look for
4 starttls-gnutls-program instead of starttls-program iff
5 starttls-use-gnutls is non-nil.
6 (smtpmail-open-stream): Don't overwrite user settings of
7 starttls-extra-arguments and starttls-extra-args.
8
12004-10-10 Kai Grossjohann <kai.grossjohann@gmx.net> 92004-10-10 Kai Grossjohann <kai.grossjohann@gmx.net>
2 10
3 * net/ange-ftp.el (ange-ftp-remote-shell): Remove variable. 11 * net/ange-ftp.el (ange-ftp-remote-shell): Remove variable.
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 84a61350145..d356979ea26 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -471,26 +471,32 @@ This is relative to `smtpmail-queue-dir'.")
471 (if (null (and cred (condition-case () 471 (if (null (and cred (condition-case ()
472 (progn 472 (progn
473 (require 'starttls) 473 (require 'starttls)
474 (call-process starttls-program)) 474 (call-process (if starttls-use-gnutls
475 starttls-gnutls-program
476 starttls-program)))
475 (error nil)))) 477 (error nil))))
476 ;; The normal case. 478 ;; The normal case.
477 (open-network-stream "SMTP" process-buffer host port) 479 (open-network-stream "SMTP" process-buffer host port)
478 (let* ((cred-key (smtpmail-cred-key cred)) 480 (let* ((cred-key (smtpmail-cred-key cred))
479 (cred-cert (smtpmail-cred-cert cred)) 481 (cred-cert (smtpmail-cred-cert cred))
480 (starttls-extra-args 482 (starttls-extra-args
481 (when (and (stringp cred-key) (stringp cred-cert) 483 (append
482 (file-regular-p 484 starttls-extra-args
483 (setq cred-key (expand-file-name cred-key))) 485 (when (and (stringp cred-key) (stringp cred-cert)
484 (file-regular-p 486 (file-regular-p
485 (setq cred-cert (expand-file-name cred-cert)))) 487 (setq cred-key (expand-file-name cred-key)))
486 (list "--key-file" cred-key "--cert-file" cred-cert))) 488 (file-regular-p
489 (setq cred-cert (expand-file-name cred-cert))))
490 (list "--key-file" cred-key "--cert-file" cred-cert))))
487 (starttls-extra-arguments 491 (starttls-extra-arguments
488 (when (and (stringp cred-key) (stringp cred-cert) 492 (append
489 (file-regular-p 493 starttls-extra-arguments
490 (setq cred-key (expand-file-name cred-key))) 494 (when (and (stringp cred-key) (stringp cred-cert)
491 (file-regular-p 495 (file-regular-p
492 (setq cred-cert (expand-file-name cred-cert)))) 496 (setq cred-key (expand-file-name cred-key)))
493 (list "--x509keyfile" cred-key "--x509certfile" cred-cert)))) 497 (file-regular-p
498 (setq cred-cert (expand-file-name cred-cert))))
499 (list "--x509keyfile" cred-key "--x509certfile" cred-cert)))))
494 (starttls-open-stream "SMTP" process-buffer host port))))) 500 (starttls-open-stream "SMTP" process-buffer host port)))))
495 501
496(defun smtpmail-try-auth-methods (process supported-extensions host port) 502(defun smtpmail-try-auth-methods (process supported-extensions host port)