Log a warning instead of terminating.

TLS does not explicitly require that the client initiate the handshake when
requested by the server, it can be ignored (although the server is free to
break the connection if no handshake is forthcoming).

https://www.gnutls.org/manual/html_node/Core-TLS-API.html#gnutls_005frehandshake
---
 libavformat/tls_gnutls.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index f32bc2821b..db9d50b586 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -81,6 +81,9 @@ static int print_tls_error(URLContext *h, int ret)
     case GNUTLS_E_PREMATURE_TERMINATION:
 #endif
         break;
+    case GNUTLS_E_REHANDSHAKE:
+        av_log(h, AV_LOG_WARNING, "%s\n", gnutls_strerror(ret));
+        return 0;
     case GNUTLS_E_WARNING_ALERT_RECEIVED:
         av_log(h, AV_LOG_WARNING, "%s\n", gnutls_strerror(ret));
         break;
-- 
2.20.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to