proto-stream.el (network-stream-open-starttls): Adjust to call `gnutls-negotiate...
[gnus] / lisp / proto-stream.el
index e7718a5..417e070 100644 (file)
@@ -51,9 +51,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-protocol-stream (name buffer host service &rest parameters)
@@ -187,7 +185,7 @@ PARAMETERS should be a sequence of keywords and values:
                          (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))