1 |
;;; starttls.el --- STARTTLS functions |
;;; starttls.el --- STARTTLS functions |
2 |
|
|
3 |
;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. |
;; Copyright (C) 1999, 2000, 2003, 2004, 2005 |
4 |
|
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Daiki Ueno <ueno@unixuser.org> |
;; Author: Daiki Ueno <ueno@unixuser.org> |
7 |
;; Author: Simon Josefsson <simon@josefsson.org> |
;; Author: Simon Josefsson <simon@josefsson.org> |
236 |
(starttls-negotiate-gnutls process) |
(starttls-negotiate-gnutls process) |
237 |
(signal-process (process-id process) 'SIGALRM))) |
(signal-process (process-id process) 'SIGALRM))) |
238 |
|
|
239 |
|
(if (fboundp 'set-process-query-on-exit-flag) |
240 |
|
(defalias 'starttls-set-process-query-on-exit-flag |
241 |
|
'set-process-query-on-exit-flag) |
242 |
|
(defalias 'starttls-set-process-query-on-exit-flag |
243 |
|
'process-kill-without-query)) |
244 |
|
|
245 |
(defun starttls-open-stream-gnutls (name buffer host service) |
(defun starttls-open-stream-gnutls (name buffer host service) |
246 |
(message "Opening STARTTLS connection to `%s'..." host) |
(message "Opening STARTTLS connection to `%s'..." host) |
247 |
(let* (done |
(let* (done |
253 |
(int-to-string service) |
(int-to-string service) |
254 |
service) |
service) |
255 |
starttls-extra-arguments))) |
starttls-extra-arguments))) |
256 |
(process-kill-without-query process) |
(starttls-set-process-query-on-exit-flag process nil) |
257 |
(while (and (processp process) |
(while (and (processp process) |
258 |
(eq (process-status process) 'run) |
(eq (process-status process) 'run) |
259 |
(save-excursion |
(save-excursion |
293 |
name buffer starttls-program |
name buffer starttls-program |
294 |
host (format "%s" service) |
host (format "%s" service) |
295 |
starttls-extra-args))) |
starttls-extra-args))) |
296 |
(process-kill-without-query process) |
(starttls-set-process-query-on-exit-flag process nil) |
297 |
process))) |
process))) |
298 |
|
|
299 |
(provide 'starttls) |
(provide 'starttls) |