mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-17 05:21:35 +00:00
Add OpenSSL version check around ECDH
...we'll try to support ancient OpenSSL versions on v1.2 for awhile longer.
This commit is contained in:
parent
1398975622
commit
d1e40b088a
@ -266,6 +266,8 @@ int tls_verify_cb(int ok, X509_STORE_CTX *store)
|
|||||||
static
|
static
|
||||||
int tls_init_ecdh_curve(tls_t *tls)
|
int tls_init_ecdh_curve(tls_t *tls)
|
||||||
{
|
{
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x0090800fL
|
||||||
|
#ifndef OPENSSL_NO_ECDH
|
||||||
int nid;
|
int nid;
|
||||||
EC_KEY *ecdh;
|
EC_KEY *ecdh;
|
||||||
if (!(nid = OBJ_sn2nid("prime256v1"))) {
|
if (!(nid = OBJ_sn2nid("prime256v1"))) {
|
||||||
@ -282,6 +284,9 @@ int tls_init_ecdh_curve(tls_t *tls)
|
|||||||
SSL_CTX_set_tmp_ecdh(tls->ctx, ecdh);
|
SSL_CTX_set_tmp_ecdh(tls->ctx, ecdh);
|
||||||
EC_KEY_free(ecdh);
|
EC_KEY_free(ecdh);
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
Loading…
x
Reference in New Issue
Block a user