Browse Source

lavf/tls_gnutls: retry gnutls_handshake on non fatal errors

fixes #7801

Signed-off-by: Remita Amine <remitamine@gmail.com>
(cherry picked from commit bc1749c6e4)
release/4.1
Remita Amine Jan Ekström 6 years ago
parent
commit
082dfc8bd5
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      libavformat/tls_gnutls.c

+ 7
- 5
libavformat/tls_gnutls.c View File

@@ -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_ptr(p->session, c->tcp);
gnutls_priority_set_direct(p->session, "NORMAL", NULL);
ret = gnutls_handshake(p->session);
if (ret) {
ret = print_tls_error(h, ret);
goto fail;
}
do {
ret = gnutls_handshake(p->session);
if (gnutls_error_is_fatal(ret)) {
ret = print_tls_error(h, ret);
goto fail;
}
} while (ret);
p->need_shutdown = 1;
if (c->verify) {
unsigned int status, cert_list_size;


Loading…
Cancel
Save