Skip to content

Commit

Permalink
fix openssl v1.0.2 ecdhe init
Browse files Browse the repository at this point in the history
  • Loading branch information
Wimmer, Luca authored and Wimmer, Luca committed Feb 10, 2022
1 parent d022b09 commit 8845892
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libsofia-sip-ua/tport/tport_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,21 @@ 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 OPENSSL_VERSION_NUMBER < 0x10100000L
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"));
}
#else
if (tls->accept == 0) {
SU_DEBUG_3(("%s\n", "tls: initialized ECDH"));
} else 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
#endif
if (!SSL_CTX_set_cipher_list(tls->ctx, ti->ciphers)) {
SU_DEBUG_1(("%s: error setting cipher list\n", "tls_init_context"));
Expand Down

0 comments on commit 8845892

Please sign in to comment.