Skip to content

Commit

Permalink
Improve GnuTLS compatibility options
Browse files Browse the repository at this point in the history
TLSv1.0, no safe renegotiation, no padding.

For some reason, large amounts of padding are causing the Intel servers to
kick me off — although gnutls-cli is allowed to use large amounts of padding
with getting disconnected, and I can't see *why* there's a difference.

So there's something else odd going on here, and disabling padding is just
a workaround. I bet I forget about this, and I bet it comes back to bite
me one day. And it'll serve me right for being lazy and not following it
up properly right now. But still, there's plenty more GnuTLS porting work
to be done and I've spent long enough staring at packet traces already
today.

Disable safe renegotiation because we've previously observed that some
servers are behind crappy firewalls that'll block *any* extension.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed May 30, 2012
1 parent 7d974cd commit 91867b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gnutls.c
Expand Up @@ -662,8 +662,15 @@ int openconnect_open_https(struct openconnect_info *vpninfo)

}
gnutls_init (&vpninfo->https_sess, GNUTLS_CLIENT);
gnutls_priority_set_direct (vpninfo->https_sess, "NORMAL", NULL);
err = gnutls_priority_set_direct (vpninfo->https_sess, "NONE:+VERS-TLS1.0:+SHA1:+AES-128-CBC:+RSA:+COMP-NULL:%COMPAT:%DISABLE_SAFE_RENEGOTIATION", NULL);
if (err) {
vpn_progress(vpninfo, PRG_ERR,
_("Failed to set TLS priority string: %s\n"),
gnutls_strerror(err));
return -EIO;
}

gnutls_record_disable_padding (vpninfo->https_sess);
workaround_openssl_certchain_bug(vpninfo);
gnutls_credentials_set (vpninfo->https_sess, GNUTLS_CRD_CERTIFICATE, vpninfo->https_cred);
gnutls_transport_set_ptr(vpninfo->https_sess, /* really? */(gnutls_transport_ptr_t)(long) ssl_sock);
Expand Down

0 comments on commit 91867b1

Please sign in to comment.