Commit bc1749c6 authored by Remita Amine's avatar Remita Amine Committed by Jan Ekström

lavf/tls_gnutls: retry gnutls_handshake on non fatal errors

fixes #7801
Signed-off-by: 's avatarRemita Amine <remitamine@gmail.com>
parent c9c1711f
...@@ -182,11 +182,13 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op ...@@ -182,11 +182,13 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
gnutls_transport_set_push_function(p->session, gnutls_url_push); gnutls_transport_set_push_function(p->session, gnutls_url_push);
gnutls_transport_set_ptr(p->session, c->tcp); gnutls_transport_set_ptr(p->session, c->tcp);
gnutls_priority_set_direct(p->session, "NORMAL", NULL); gnutls_priority_set_direct(p->session, "NORMAL", NULL);
ret = gnutls_handshake(p->session); do {
if (ret) { ret = gnutls_handshake(p->session);
ret = print_tls_error(h, ret); if (gnutls_error_is_fatal(ret)) {
goto fail; ret = print_tls_error(h, ret);
} goto fail;
}
} while (ret);
p->need_shutdown = 1; p->need_shutdown = 1;
if (c->verify) { if (c->verify) {
unsigned int status, cert_list_size; unsigned int status, cert_list_size;
......
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