GnuTLS & OpenSSL incompatibility in RHEL

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Tue Sep 23 07:45:13 PDT 2014


On Tue, Sep 23, 2014 at 4:41 PM, Nikos Mavrogiannopoulos
<n.mavrogiannopoulos at gmail.com> wrote:
> On Tue, Sep 23, 2014 at 8:42 AM, Alexander Rumyantsev
> <alexander at rumyantsev.com> wrote:
>> Hi!
>> I have ocserv running on RHEL 6.5 and openconnect on OS X 10.9+macports
>> Recently I decided to hide ocserv behind haproxy to separate anyconnect connections from browser connections by User-Agent header.
>> But i couldn't establish connection due to following error: "SSL connection failure: curve not supported"
>> I think that's because of RHEL ships with hobbled OpenSSL (against of which haproxy was built) with very limited elliptic curves support due to RH Legal patent fears.
>
> It seems the issue is on all parties here. Openconnect sets -CURVE-ALL
> if gnutls < 3.2.9 is used. Then the openssl server negotiates an ECDHE
> ciphersuite even if no curve was sent by the client. That's pretty
> nasty situation.

A fix for openconnect could be the attached patch.

regards,
Nikos
-------------- next part --------------
diff --git a/gnutls.c b/gnutls.c
index 13fb36c..1c1921f 100644
--- a/gnutls.c
+++ b/gnutls.c
@@ -1854,7 +1854,7 @@ static int verify_peer(gnutls_session_t session)
 # define _DEFAULT_PRIO "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:" \
 	"%COMPAT:%DISABLE_SAFE_RENEGOTIATION:%LATEST_RECORD_VERSION"
 # if GNUTLS_VERSION_MAJOR >= 3
-#  define DEFAULT_PRIO _DEFAULT_PRIO":-CURVE-ALL"
+#  define DEFAULT_PRIO _DEFAULT_PRIO":-CURVE-ALL:-ECDHE-RSA:-ECDHE-ECDSA"
 #else
 #  define DEFAULT_PRIO _DEFAULT_PRIO
 # endif
@@ -1983,7 +1983,6 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
 	} else {
 		prio = DEFAULT_PRIO;
 	}
-
 	err = gnutls_priority_set_direct(vpninfo->https_sess,
 					prio, NULL);
 	if (err) {


More information about the openconnect-devel mailing list