From 8aad061f2981240aed5e7eb7dd184f25fb1a35eb Mon Sep 17 00:00:00 2001 From: discomfitor Date: Sat, 18 Sep 2010 08:46:17 +0000 Subject: [PATCH] add mixed protocol for gnutls as well git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@52412 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_con/ecore_con_ssl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib/ecore_con/ecore_con_ssl.c b/src/lib/ecore_con/ecore_con_ssl.c index 53c4e11..daa288f 100644 --- a/src/lib/ecore_con/ecore_con_ssl.c +++ b/src/lib/ecore_con/ecore_con_ssl.c @@ -303,6 +303,7 @@ _ecore_con_ssl_server_init_gnutls(Ecore_Con_Server *svr) #endif 0 }; + const int mixed_proto[] = { GNUTLS_VERSION_MAX, GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 }; switch (svr->type & ECORE_CON_SSL) { @@ -320,6 +321,11 @@ _ecore_con_ssl_server_init_gnutls(Ecore_Con_Server *svr) proto = tls_proto; break; + case ECORE_CON_USE_TLS | ECORE_CON_USE_SSL3: + case ECORE_CON_USE_TLS | ECORE_CON_USE_SSL3 | ECORE_CON_LOAD_CERT: + proto = mixed_proto; + break; + default: return ECORE_CON_SSL_ERROR_NONE; } @@ -491,6 +497,7 @@ _ecore_con_ssl_client_init_gnutls(Ecore_Con_Client *cl) #endif 0 }; + const int mixed_proto[] = { GNUTLS_VERSION_MAX, GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 }; switch (cl->server->type & ECORE_CON_SSL) { @@ -508,6 +515,11 @@ _ecore_con_ssl_client_init_gnutls(Ecore_Con_Client *cl) proto = tls_proto; break; + case ECORE_CON_USE_TLS | ECORE_CON_USE_SSL3: + case ECORE_CON_USE_TLS | ECORE_CON_USE_SSL3 | ECORE_CON_LOAD_CERT: + proto = mixed_proto; + break; + default: return ECORE_CON_SSL_ERROR_NONE; } -- 2.7.4