History

avformat/tls_openssl: verify setting hostname for SNI

Marvin Scholz committed 1 year ago

Commit f4befeb1 parent e56fd2a1 file · +5 −1Browse files

Unified · Split

libavformat/tls_openssl.c+5−1
@@ -962,7 +962,11 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op · 961 unmodified lines
962962 ret = AVERROR_EXTERNAL;
963963 goto fail;
964964 }
965− SSL_set_tlsext_host_name(p->ssl, c->host);
965+ if (!SSL_set_tlsext_host_name(p->ssl, c->host)) {
966+ av_log(h, AV_LOG_ERROR, "Failed to set hostname for SNI: %s\n", openssl_get_error(p));
967+ ret = AVERROR_EXTERNAL;
968+ goto fail;
969+ }
966970 }
967971 ret = c->listen ? SSL_accept(p->ssl) : SSL_connect(p->ssl);
968972 if (ret == 0) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t