(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-protocol-stream (name buffer host service &rest parameters)
(proto-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))