From patchwork Mon Feb 27 10:01:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: tls: Conditionally use SSL_set_tlsext_host_name if available X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 17585 Message-Id: <1330336911-98103-1-git-send-email-martin@martin.st> To: libav-devel@libav.org Date: Mon, 27 Feb 2012 12:01:51 +0200 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= List-Id: libav development This fixes building libavformat with OpenSSL on slightly older distributions (e.g. CentOS 5.5). --- libavformat/tls.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libavformat/tls.c b/libavformat/tls.c index fb84fa8..a9e3b27 100644 --- a/libavformat/tls.c +++ b/libavformat/tls.c @@ -177,8 +177,10 @@ static int tls_open(URLContext *h, const char *uri, int flags) goto fail; } SSL_set_fd(c->ssl, c->fd); +#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME if (!numerichost) SSL_set_tlsext_host_name(c->ssl, host); +#endif while (1) { ret = SSL_connect(c->ssl); if (ret > 0)