]> code.delx.au - gnu-emacs/commitdiff
(smtpmail-open-stream): Look for
authorSimon Josefsson <jas@extundo.com>
Mon, 11 Oct 2004 18:42:18 +0000 (18:42 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 11 Oct 2004 18:42:18 +0000 (18:42 +0000)
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.

lisp/ChangeLog
lisp/mail/smtpmail.el

index 267307ed3959e4e5774e0289babc0a6e4227e227..c050e2cd6829134386fbaee37432cfc7b33291f0 100644 (file)
@@ -1,3 +1,11 @@
+2004-10-11  Simon Josefsson  <jas@extundo.com>
+
+       * mail/smtpmail.el (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.
+
 2004-10-10  Kai Grossjohann  <kai.grossjohann@gmx.net>
 
        * net/ange-ftp.el (ange-ftp-remote-shell): Remove variable.
index 84a61350145111a7f28eec77b71fd181a66b5c86..d356979ea26bfa46a45c7f3077dc21ae13147c13 100644 (file)
@@ -471,26 +471,32 @@ This is relative to `smtpmail-queue-dir'.")
     (if (null (and cred (condition-case ()
                            (progn
                              (require 'starttls)
-                             (call-process starttls-program))
+                             (call-process (if starttls-use-gnutls
+                                               starttls-gnutls-program
+                                             starttls-program)))
                          (error nil))))
        ;; The normal case.
        (open-network-stream "SMTP" process-buffer host port)
       (let* ((cred-key (smtpmail-cred-key cred))
             (cred-cert (smtpmail-cred-cert cred))
             (starttls-extra-args
-             (when (and (stringp cred-key) (stringp cred-cert)
-                        (file-regular-p
-                         (setq cred-key (expand-file-name cred-key)))
-                        (file-regular-p
-                         (setq cred-cert (expand-file-name cred-cert))))
-               (list "--key-file" cred-key "--cert-file" cred-cert)))
+             (append
+              starttls-extra-args
+              (when (and (stringp cred-key) (stringp cred-cert)
+                         (file-regular-p
+                          (setq cred-key (expand-file-name cred-key)))
+                         (file-regular-p
+                          (setq cred-cert (expand-file-name cred-cert))))
+                (list "--key-file" cred-key "--cert-file" cred-cert))))
             (starttls-extra-arguments
-             (when (and (stringp cred-key) (stringp cred-cert)
-                        (file-regular-p
-                         (setq cred-key (expand-file-name cred-key)))
-                        (file-regular-p
-                         (setq cred-cert (expand-file-name cred-cert))))
-               (list "--x509keyfile" cred-key "--x509certfile" cred-cert))))
+             (append
+              starttls-extra-arguments
+              (when (and (stringp cred-key) (stringp cred-cert)
+                         (file-regular-p
+                          (setq cred-key (expand-file-name cred-key)))
+                         (file-regular-p
+                          (setq cred-cert (expand-file-name cred-cert))))
+                (list "--x509keyfile" cred-key "--x509certfile" cred-cert)))))
        (starttls-open-stream "SMTP" process-buffer host port)))))
 
 (defun smtpmail-try-auth-methods (process supported-extensions host port)