summaryrefslogtreecommitdiff
path: root/main/tcptls.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-07-03 16:55:44 +0000
committerMatthew Jordan <mjordan@digium.com>2014-07-03 16:55:44 +0000
commit758b13858b79256104c0f81a9adf1924df7d2da9 (patch)
treeb84b837a5ff661543afd11bc353e1f410699297d /main/tcptls.c
parentaa370d6105e4d69fc6fc6c72baecfbf5d51534ef (diff)
main/tcptls: Add checks for OpenSSL Elliptic Curve support
The patch for ASTERISK-23905 that added PFS support in Asterisk depends on the elliptic curve library support being present in OpenSSL. As it turns out, some versions of OpenSSL don't have this library - notably the version running on our build agents. This patch fixes the build by providing a configure check for the specific library calls that the PFS patch relies on. Review: https://reviewboard.asterisk.org/r/3709/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/tcptls.c')
-rw-r--r--main/tcptls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/tcptls.c b/main/tcptls.c
index b838452e6..609023440 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -825,6 +825,8 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client)
}
}
+#ifdef HAVE_OPENSSL_EC
+
if (!ast_strlen_zero(cfg->pvtfile)) {
BIO *bio = BIO_new_file(cfg->pvtfile, "r");
if (bio != NULL) {
@@ -857,6 +859,8 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client)
}
}
+#endif /* #ifdef HAVE_OPENSSL_EC */
+
ast_verb(2, "TLS/SSL certificate ok\n"); /* We should log which one that is ok. This message doesn't really make sense in production use */
return 1;
#endif