summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-06-21 19:39:51 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-06-21 19:39:51 -0500
commiteb08734a94d99492e554ac05b25ece5d8385e112 (patch)
treef2f7c441d7417eec5e2b3bb4dec8d2726d87f252
parenteaaab8f55fc57cd4f7fc6131684f3ac845117bbe (diff)
parent6eb0354f2d0a7845ee3f302a54a84c39f10be620 (diff)
Merge "res_rtp_asterisk: Use latest DTLS version available by underlying platform."
-rw-r--r--res/res_rtp_asterisk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 9e3ff757c..1bf16941d 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -1357,7 +1357,12 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
return 0;
}
- if (!(rtp->ssl_ctx = SSL_CTX_new(DTLSv1_method()))) {
+#if OPENSSL_VERSION_NUMBER < 0x10002000L
+ rtp->ssl_ctx = SSL_CTX_new(DTLSv1_method());
+#else
+ rtp->ssl_ctx = SSL_CTX_new(DTLS_method());
+#endif
+ if (!rtp->ssl_ctx) {
return -1;
}