mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
FS-6387 don't fail if your openssl package has been compiled without EC support...LOOKING AT YOU GENTOO
This commit is contained in:
parent
90404d5889
commit
16577339be
@ -1 +1 @@
|
|||||||
Wed Mar 19 14:23:50 CDT 2014
|
Thu Mar 20 08:00:42 CDT 2014
|
||||||
|
@ -267,6 +267,7 @@ void tls_init(void) {
|
|||||||
ONCE_INIT(tls_init_once);
|
ONCE_INIT(tls_init_once);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_EC
|
||||||
static
|
static
|
||||||
int tls_init_ecdh_curve(tls_t *tls)
|
int tls_init_ecdh_curve(tls_t *tls)
|
||||||
{
|
{
|
||||||
@ -287,6 +288,7 @@ int tls_init_ecdh_curve(tls_t *tls)
|
|||||||
EC_KEY_free(ecdh);
|
EC_KEY_free(ecdh);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static
|
static
|
||||||
int tls_init_context(tls_t *tls, tls_issues_t const *ti)
|
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_depth(tls->ctx, ti->verify_depth);
|
||||||
SSL_CTX_set_verify(tls->ctx, verify, tls_verify_cb);
|
SSL_CTX_set_verify(tls->ctx, verify, tls_verify_cb);
|
||||||
|
#ifndef OPENSSL_NO_EC
|
||||||
if (tls_init_ecdh_curve(tls) == 0) {
|
if (tls_init_ecdh_curve(tls) == 0) {
|
||||||
SU_DEBUG_3(("%s\n", "tls: initialized ECDH"));
|
SU_DEBUG_3(("%s\n", "tls: initialized ECDH"));
|
||||||
} else {
|
} else {
|
||||||
SU_DEBUG_3(("%s\n", "tls: failed to initialize ECDH"));
|
SU_DEBUG_3(("%s\n", "tls: failed to initialize ECDH"));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (!SSL_CTX_set_cipher_list(tls->ctx, ti->ciphers)) {
|
if (!SSL_CTX_set_cipher_list(tls->ctx, ti->ciphers)) {
|
||||||
SU_DEBUG_1(("%s: error setting cipher list\n", "tls_init_context"));
|
SU_DEBUG_1(("%s: error setting cipher list\n", "tls_init_context"));
|
||||||
tls_log_errors(3, "tls_init_context", 0);
|
tls_log_errors(3, "tls_init_context", 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user