Skip to content

Commit

Permalink
lavf/tls_securetransport: fix SNI support when not verifying
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
Rodger Combs authored and michaelni committed Jun 8, 2015
1 parent 074159e commit ecefce4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libavformat/tls_securetransport.c
Expand Up @@ -273,13 +273,13 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
if (s->ca_file) {
if ((ret = load_ca(h)) < 0)
goto fail;
CHECK_ERROR(SSLSetSessionOption, c->ssl_context, kSSLSessionOptionBreakOnServerAuth, true);
}
if (s->ca_file || !s->verify)
CHECK_ERROR(SSLSetSessionOption, c->ssl_context, kSSLSessionOptionBreakOnServerAuth, true);
if (s->cert_file)
if ((ret = load_cert(h)) < 0)
goto fail;
if (s->verify)
CHECK_ERROR(SSLSetPeerDomainName, c->ssl_context, s->host, strlen(s->host));
CHECK_ERROR(SSLSetPeerDomainName, c->ssl_context, s->host, strlen(s->host));
CHECK_ERROR(SSLSetIOFuncs, c->ssl_context, tls_read_cb, tls_write_cb);
CHECK_ERROR(SSLSetConnection, c->ssl_context, h);
while (1) {
Expand Down

0 comments on commit ecefce4

Please sign in to comment.