summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-15 14:14:03 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-15 16:12:59 +0900
commitf179d32157ca4bf006a287901834aa2d7c344dc5 (patch)
tree6c00dd083d7124ee6bef6b7059d8ca7a9e977aa1 /src/lib
parentd3440a9867cf67f03f7fea02075f88d0441c92e7 (diff)
efl net - adapt to openssl 1.1.0 changes with tls method support
support the tls methods if on openssl 1.1.0 so we don't get "unsupported cipher" as it does support it just with a new api. @fix
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_con/efl_net_ssl_ctx-openssl.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/lib/ecore_con/efl_net_ssl_ctx-openssl.c b/src/lib/ecore_con/efl_net_ssl_ctx-openssl.c
index ce87b91..0fef44e 100644
--- a/src/lib/ecore_con/efl_net_ssl_ctx-openssl.c
+++ b/src/lib/ecore_con/efl_net_ssl_ctx-openssl.c
@@ -269,7 +269,7 @@ efl_net_ssl_ctx_setup(Efl_Net_Ssl_Ctx *ctx, Efl_Net_Ssl_Ctx_Config cfg)
269#ifndef OPENSSL_NO_SSL3_METHOD 269#ifndef OPENSSL_NO_SSL3_METHOD
270 ctx->ssl_ctx = SSL_CTX_new(SSLv3_client_method()); 270 ctx->ssl_ctx = SSL_CTX_new(SSLv3_client_method());
271#else 271#else
272 ERR("ssl_ctx=%p SSLv3 is disabled in your OpenSSL build", ctx); 272 ctx->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
273#endif 273#endif
274 break; 274 break;
275#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) 275#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
@@ -282,6 +282,12 @@ efl_net_ssl_ctx_setup(Efl_Net_Ssl_Ctx *ctx, Efl_Net_Ssl_Ctx_Config cfg)
282 case EFL_NET_SSL_CIPHER_TLSV1_2: 282 case EFL_NET_SSL_CIPHER_TLSV1_2:
283 ctx->ssl_ctx = SSL_CTX_new(TLSv1_2_client_method()); 283 ctx->ssl_ctx = SSL_CTX_new(TLSv1_2_client_method());
284 break; 284 break;
285#else
286 case EFL_NET_SSL_CIPHER_TLSV1:
287 case EFL_NET_SSL_CIPHER_TLSV1_1:
288 case EFL_NET_SSL_CIPHER_TLSV1_2:
289 ctx->ssl_ctx = SSL_CTX_new(TLS_client_method());
290 break;
285#endif 291#endif
286 default: 292 default:
287 ERR("ssl_ctx=%p unsupported cipher %d", ctx, cfg.cipher); 293 ERR("ssl_ctx=%p unsupported cipher %d", ctx, cfg.cipher);
@@ -301,7 +307,7 @@ efl_net_ssl_ctx_setup(Efl_Net_Ssl_Ctx *ctx, Efl_Net_Ssl_Ctx_Config cfg)
301#ifndef OPENSSL_NO_SSL3_METHOD 307#ifndef OPENSSL_NO_SSL3_METHOD
302 ctx->ssl_ctx = SSL_CTX_new(SSLv3_server_method()); 308 ctx->ssl_ctx = SSL_CTX_new(SSLv3_server_method());
303#else 309#else
304 ERR("ssl_ctx=%p SSLv3 is disabled in your OpenSSL build", ctx); 310 ctx->ssl_ctx = SSL_CTX_new(SSLv23_server_method());
305#endif 311#endif
306 break; 312 break;
307#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) 313#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
@@ -314,6 +320,12 @@ efl_net_ssl_ctx_setup(Efl_Net_Ssl_Ctx *ctx, Efl_Net_Ssl_Ctx_Config cfg)
314 case EFL_NET_SSL_CIPHER_TLSV1_2: 320 case EFL_NET_SSL_CIPHER_TLSV1_2:
315 ctx->ssl_ctx = SSL_CTX_new(TLSv1_2_server_method()); 321 ctx->ssl_ctx = SSL_CTX_new(TLSv1_2_server_method());
316 break; 322 break;
323#else
324 case EFL_NET_SSL_CIPHER_TLSV1:
325 case EFL_NET_SSL_CIPHER_TLSV1_1:
326 case EFL_NET_SSL_CIPHER_TLSV1_2:
327 ctx->ssl_ctx = SSL_CTX_new(TLS_server_method());
328 break;
317#endif 329#endif
318 default: 330 default:
319 ERR("ssl_ctx=%p unsupported cipher %d", ctx, cfg.cipher); 331 ERR("ssl_ctx=%p unsupported cipher %d", ctx, cfg.cipher);