You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
957 B

  1. From 826ad45a86f1556910c2f00dfa6477879deb978f Mon Sep 17 00:00:00 2001
  2. From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
  3. Date: Thu, 24 Jul 2014 21:59:01 +0200
  4. Subject: [PATCH] Added a default timeout value in CSTP handshake using gnutls
  5. [dwmw2: move it to openconnect_open_https() so it's done only once]
  6. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
  7. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  8. ---
  9. gnutls.c | 4 ++++
  10. 1 file changed, 4 insertions(+)
  11. diff --git a/gnutls.c b/gnutls.c
  12. index 3e3204a..2ef836c 100644
  13. --- a/gnutls.c
  14. +++ b/gnutls.c
  15. @@ -2017,6 +2017,10 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
  16. vpn_progress(vpninfo, PRG_INFO, _("SSL negotiation with %s\n"),
  17. vpninfo->hostname);
  18. +#ifdef GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT
  19. + gnutls_handshake_set_timeout(vpninfo->https_sess,
  20. + GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT);
  21. +#endif
  22. err = cstp_handshake(vpninfo, 1);
  23. if (err)
  24. --
  25. 2.0.0