avformat/tls_{openssl,mbedtls}: parse host when external_sock is true
See 28b92b9b2e
Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
This commit is contained in:
@@ -509,6 +509,9 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
|
||||
if (!shr->external_sock) {
|
||||
if ((ret = ff_tls_open_underlying(shr, h, uri, options)) < 0)
|
||||
goto fail;
|
||||
} else if (!shr->host) {
|
||||
if ((ret = ff_tls_parse_host(shr, shr->underlying_host, sizeof(shr->underlying_host), NULL, uri)) < 0)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
#ifdef MBEDTLS_PSA_CRYPTO_C
|
||||
|
||||
@@ -783,6 +783,9 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
|
||||
if (!c->tls_shared.external_sock) {
|
||||
if ((ret = ff_tls_open_underlying(&c->tls_shared, h, uri, options)) < 0)
|
||||
goto fail;
|
||||
} else if (!s->host) {
|
||||
if ((ret = ff_tls_parse_host(s, s->underlying_host, sizeof(s->underlying_host), NULL, uri)) < 0)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
// We want to support all versions of TLS >= 1.0, but not the deprecated
|
||||
|
||||
Reference in New Issue
Block a user