From 8cb8f0e249301710bccb3ad26606f495c7811dc0 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 8 Jan 2008 21:28:51 +0000 Subject: [PATCH] Add support for TLS SVN revision: 33400 --- legacy/ecore/src/lib/ecore_con/Ecore_Con.h | 3 ++- legacy/ecore/src/lib/ecore_con/ecore_con.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/legacy/ecore/src/lib/ecore_con/Ecore_Con.h b/legacy/ecore/src/lib/ecore_con/Ecore_Con.h index d9f8fb5887..c11607831e 100644 --- a/legacy/ecore/src/lib/ecore_con/Ecore_Con.h +++ b/legacy/ecore/src/lib/ecore_con/Ecore_Con.h @@ -75,7 +75,8 @@ extern "C" { ECORE_CON_LOCAL_ABSTRACT, ECORE_CON_REMOTE_SYSTEM, ECORE_CON_USE_SSL2 = (1 << 4), - ECORE_CON_USE_SSL3 = (1 << 5) + ECORE_CON_USE_SSL3 = (1 << 5), + ECORE_CON_USE_TLS = (1 << 6) } Ecore_Con_Type; #define ECORE_CON_USE_SSL ECORE_CON_USE_SSL2 diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c index 278c46bfff..42dab537b1 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c @@ -334,6 +334,10 @@ ecore_con_server_add(Ecore_Con_Type compl_type, const char *name, int port, if (!(svr->ssl_ctx = SSL_CTX_new(SSLv3_client_method()))) goto error; break; + case ECORE_CON_USE_TLS: + if (!(svr->ssl_ctx = SSL_CTX_new(TLSv1_client_method()))) + goto error; + break; } if (!(svr->ssl = SSL_new(svr->ssl_ctx))) @@ -1192,6 +1196,10 @@ _ecore_con_cb_dns_lookup(void *data, struct hostent *he) if (!(svr->ssl_ctx = SSL_CTX_new(SSLv3_client_method()))) goto error; break; + case ECORE_CON_USE_TLS: + if (!(svr->ssl_ctx = SSL_CTX_new(TLSv1_client_method()))) + goto error; + break; } if (!(svr->ssl = SSL_new(svr->ssl_ctx)))