From 58d205dc19556882d156f9c931df16650df1350d Mon Sep 17 00:00:00 2001 From: Brian West Date: Thu, 20 Mar 2014 08:07:53 -0500 Subject: [PATCH] FS-6387 don't fail if your openssl package has been compiled without EC support...LOOKING AT YOU GENTOO --- .update | 2 +- libsofia-sip-ua/tport/tport_tls.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.update b/.update index a2251651..df6c959c 100644 --- a/.update +++ b/.update @@ -1 +1 @@ -Wed Mar 19 14:23:50 CDT 2014 +Thu Mar 20 08:00:42 CDT 2014 diff --git a/libsofia-sip-ua/tport/tport_tls.c b/libsofia-sip-ua/tport/tport_tls.c index 97bc5b98..5689d582 100644 --- a/libsofia-sip-ua/tport/tport_tls.c +++ b/libsofia-sip-ua/tport/tport_tls.c @@ -267,6 +267,7 @@ void tls_init(void) { ONCE_INIT(tls_init_once); } +#ifndef OPENSSL_NO_EC static int tls_init_ecdh_curve(tls_t *tls) { @@ -287,6 +288,7 @@ int tls_init_ecdh_curve(tls_t *tls) EC_KEY_free(ecdh); return 0; } +#endif static int tls_init_context(tls_t *tls, tls_issues_t const *ti) @@ -407,13 +409,13 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti) SSL_CTX_set_verify_depth(tls->ctx, ti->verify_depth); SSL_CTX_set_verify(tls->ctx, verify, tls_verify_cb); - +#ifndef OPENSSL_NO_EC if (tls_init_ecdh_curve(tls) == 0) { SU_DEBUG_3(("%s\n", "tls: initialized ECDH")); } else { SU_DEBUG_3(("%s\n", "tls: failed to initialize ECDH")); } - +#endif if (!SSL_CTX_set_cipher_list(tls->ctx, ti->ciphers)) { SU_DEBUG_1(("%s: error setting cipher list\n", "tls_init_context")); tls_log_errors(3, "tls_init_context", 0);