]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added debugging ability to cipher-test.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 5 Jun 2011 02:38:34 +0000 (04:38 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 5 Jun 2011 02:38:34 +0000 (04:38 +0200)
tests/cipher-test.c

index 000cfdeb646eeba8f5be9fdf10a4a43c7dde7a88..c14813f787281b95ee2ab3c4ed8b41f71bfb738d 100644 (file)
@@ -455,10 +455,20 @@ test_hash (void)
 
 }
 
+static void
+tls_log_func (int level, const char *str)
+{
+  fprintf (stderr, "<%d>| %s", level, str);
+}
+
 
 int
 main (int argc, char **argv)
 {
+  gnutls_global_set_log_function (tls_log_func);
+  if (argc > 1)
+    gnutls_global_set_log_level (4711);
+
   gnutls_global_init ();
 
   if (test_aes ())