[vlc-commits] gnutls: show session flags in debug

Rémi Denis-Courmont git at videolan.org
Thu Feb 23 21:41:35 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 23 22:39:21 2017 +0200| [9192a346168dd7f9c7c8396b59bb1bc065c9c2ba] | committer: Rémi Denis-Courmont

gnutls: show session flags in debug

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9192a346168dd7f9c7c8396b59bb1bc065c9c2ba
---

 modules/misc/gnutls.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index 4f22d28..70e1216 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -369,7 +369,19 @@ static int gnutls_ContinueHandshake(vlc_tls_creds_t *crd, vlc_tls_t *tls,
     msg_Err(crd, "TLS handshake error: %s", gnutls_strerror (val));
     return -1;
 
+    unsigned flags;
 done:
+    flags = gnutls_session_get_flags(session);
+
+    if (flags & GNUTLS_SFLAGS_SAFE_RENEGOTIATION)
+        msg_Dbg(crd, " - safe renegotiation (RFC5746) enabled");
+#if (GNUTLS_VERSION_NUMBER >= 0x030400)
+    if (flags & GNUTLS_SFLAGS_EXT_MASTER_SECRET)
+        msg_Dbg(crd, " - extended master secret (RFC7627) enabled");
+    if (flags & GNUTLS_SFLAGS_ETM)
+        msg_Dbg(crd, " - encrypt then MAC (RFC7366) enabled");
+#endif
+
     if (alp != NULL)
     {
         gnutls_datum_t datum;



More information about the vlc-commits mailing list