Commit 7c39305a authored by Stefan _'s avatar Stefan _ Committed by Jan Ekström

libavformat/tls_libtls: pass numeric hostnames to tls_connect_cbs()

Numeric hosts in certificates are not very common, but supported by LibreSSL.
Forward the IP address to make verification work in this case.

Fixes ticket #7029
parent 56912555
...@@ -119,7 +119,7 @@ static int ff_tls_open(URLContext *h, const char *uri, int flags, AVDictionary * ...@@ -119,7 +119,7 @@ static int ff_tls_open(URLContext *h, const char *uri, int flags, AVDictionary *
if (!c->listen) { if (!c->listen) {
ret = tls_connect_cbs(p->ctx, tls_read_callback, tls_write_callback, ret = tls_connect_cbs(p->ctx, tls_read_callback, tls_write_callback,
c->tcp, !c->numerichost ? c->host : NULL); c->tcp, c->host);
} else { } else {
struct tls *ctx_new; struct tls *ctx_new;
ret = tls_accept_cbs(p->ctx, &ctx_new, tls_read_callback, ret = tls_accept_cbs(p->ctx, &ctx_new, tls_read_callback,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment