-;;; starttls.el --- TLSv1 functions
+;;; starttls.el --- STARTTLS functions
-;; Copyright (C) 1999 Daiki Ueno
+;; Copyright (C) 1999, 2000 Free Software Foundation, Inc.
-;; Author: Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
-;; Kenichi OKADA <okada@opaopa.org>
+;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/11/20
;; Keywords: TLS, SSL, OpenSSL
;;; Commentary:
-;; This module defines some utility functions for TLSv1 functions.
-
-;; [RFC 2246] "The TLS Protocol Version 1.0"
-;; by Christopher Allen <callen@certicom.com> and
-;; Tim Dierks <tdierks@certicom.com> (1999/01)
+;; This module defines some utility functions for STARTTLS profiles.
;; [RFC 2595] "Using TLS with IMAP, POP3 and ACAP"
;; by Chris Newman <chris.newman@innosoft.com> (1999/06)
"The program to run in a subprocess to open an TLSv1 connection."
:group 'starttls)
+(defcustom starttls-negotiation-by-kill-program nil
+ "Starting starttls negotiation by kill command if non-nil."
+ :group 'starttls)
+
+(defcustom starttls-kill-program "c:\\cygwin\\bin\kill"
+ "External kill command to send SIGALRM to starttls."
+ :group 'starttls)
+
(defcustom starttls-extra-args nil
"Extra arguments to `starttls-program'"
:group 'starttls)
(defun starttls-negotiate (process)
- (signal-process (process-id process) 'SIGALRM))
+ (if starttls-negotiation-by-kill-program
+ (call-process starttls-kill-program nil nil nil
+ "-ALRM" (format "%d" (process-id process)))
+ (signal-process (process-id process) 'SIGALRM)))
(defun starttls-open-stream (name buffer host service)
"Open a TLS connection for a service to a host.
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."
-
(let* ((process-connection-type nil)
(process (apply #'start-process
name buffer starttls-program
(process-kill-without-query process)
process))
-(defun starttls-open-ssl-stream (name buffer host service)
- "This function is compatible with the function `open-ssl-stream'."
- (let* ((starttls-extra-args
- (cons "--force" starttls-extra-args)))
- (starttls-open-stream name buffer host service)))
-
(provide 'starttls)
;;; starttls.el ends here