;;; starttls.el --- STARTTLS functions
-;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Author: Simon Josefsson <simon@josefsson.org>
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
"Name of GNUTLS command line tool.
This program is used when GNUTLS is used, i.e. when
`starttls-use-gnutls' is non-nil."
+ :version "22.1"
:type 'string
:group 'starttls)
(defcustom starttls-use-gnutls (not (executable-find starttls-program))
"*Whether to use GNUTLS instead of the `starttls' command."
+ :version "22.1"
:type 'boolean
:group 'starttls)
For example, non-TLS compliant servers may require
'(\"--protocols\" \"ssl3\"). Invoke \"gnutls-cli --help\" to
find out which parameters are available."
+ :version "22.1"
:type '(repeat string)
:group 'starttls)
(defcustom starttls-process-connection-type nil
"*Value for `process-connection-type' to use when starting STARTTLS process."
+ :version "22.1"
:type 'boolean
:group 'starttls)
;; GNUTLS cli.c:main() print 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"
:type 'regexp
:group 'starttls)
The default is what GNUTLS's \"gnutls-cli\" outputs."
;; GNUTLS cli.c:do_handshake() print this string on failure. If the
;; logic, or the string itself, is modified, this must be updated.
+ :version "22.1"
:type 'regexp
:group 'starttls)
;; common.c:print_info(), that unconditionally print this string
;; last. If that logic, or the string itself, is modified, this
;; must be updated.
+ :version "22.1"
:type 'regexp
:group 'starttls)
(starttls-negotiate-gnutls process)
(signal-process (process-id process) 'SIGALRM)))
+(eval-and-compile
+ (if (fboundp 'set-process-query-on-exit-flag)
+ (defalias 'starttls-set-process-query-on-exit-flag
+ 'set-process-query-on-exit-flag)
+ (defalias 'starttls-set-process-query-on-exit-flag
+ 'process-kill-without-query)))
+
(defun starttls-open-stream-gnutls (name buffer host service)
(message "Opening STARTTLS connection to `%s'..." host)
(let* (done
(int-to-string service)
service)
starttls-extra-arguments)))
- (process-kill-without-query process)
+ (starttls-set-process-query-on-exit-flag process nil)
(while (and (processp process)
(eq (process-status process) 'run)
(save-excursion
name buffer starttls-program
host (format "%s" service)
starttls-extra-args)))
- (process-kill-without-query process)
+ (starttls-set-process-query-on-exit-flag process nil)
process)))
(provide 'starttls)