1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Use CL-style keyword arguments for `gnutls-negotiate' and allow :keylist and :crlfiles arguments.

* lisp/net/gnutls.el (gnutls-negotiate): Use CL-style keyword arguments
instead of positional arguments.  Allow :keylist and :crlfiles
arguments.
(open-gnutls-stream): Call it.

* lisp/net/network-stream.el (network-stream-open-starttls): Adjust to
call `gnutls-negotiate' with :process and :hostname arguments.
This commit is contained in:
Ted Zlatanov 2011-05-03 20:44:58 -05:00
parent ef80fc093a
commit 48e79d6a80
3 changed files with 34 additions and 16 deletions

View file

@ -45,9 +45,7 @@
(require 'tls)
(require 'starttls)
(declare-function gnutls-negotiate "gnutls"
(proc type host &optional priority-string trustfiles keyfiles
verify-flags verify-error verify-hostname-error))
(declare-function gnutls-negotiate "gnutls" (&rest spec))
;;;###autoload
(defun open-network-stream (name buffer host service &rest parameters)
@ -203,7 +201,7 @@ asynchronously, if possible."
(network-stream-command stream starttls-command eoc))
;; The server said it was OK to begin STARTTLS negotiations.
(if (fboundp 'open-gnutls-stream)
(gnutls-negotiate stream nil host)
(gnutls-negotiate :process stream :hostname host)
(unless (starttls-negotiate stream)
(delete-process stream)))
(if (memq (process-status stream) '(open run))