소스 검색

crypto: drop gnutls debug logging support

GNUTLS already supports dynamically enabling its logging at runtime by
setting the env var 'GNUTLS_DEBUG_LEVEL=10', so there is no need to
re-invent this logic in QEMU in a way that requires a re-compile.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Daniel P. Berrangé 1 년 전
부모
커밋
305233349b
1개의 변경된 파일4개의 추가작업 그리고 11개의 파일을 삭제
  1. 4 11
      crypto/init.c

+ 4 - 11
crypto/init.c

@@ -34,14 +34,11 @@
 
 
 #include "crypto/random.h"
 #include "crypto/random.h"
 
 
-/* #define DEBUG_GNUTLS */
-#ifdef DEBUG_GNUTLS
-static void qcrypto_gnutls_log(int level, const char *str)
-{
-    fprintf(stderr, "%d: %s", level, str);
-}
-#endif
 
 
+/*
+ * To debug GNUTLS see env vars listed in
+ * https://gnutls.org/manual/html_node/Debugging-and-auditing.html
+ */
 int qcrypto_init(Error **errp)
 int qcrypto_init(Error **errp)
 {
 {
 #ifdef CONFIG_GNUTLS
 #ifdef CONFIG_GNUTLS
@@ -53,10 +50,6 @@ int qcrypto_init(Error **errp)
                    gnutls_strerror(ret));
                    gnutls_strerror(ret));
         return -1;
         return -1;
     }
     }
-#ifdef DEBUG_GNUTLS
-    gnutls_global_set_log_level(10);
-    gnutls_global_set_log_function(qcrypto_gnutls_log);
-#endif
 #endif
 #endif
 
 
 #ifdef CONFIG_GCRYPT
 #ifdef CONFIG_GCRYPT