[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/11] crypto: drop gnutls debug logging support
From: |
Daniel P . Berrangé |
Subject: |
[PULL 09/11] crypto: drop gnutls debug logging support |
Date: |
Wed, 24 Jul 2024 10:47:04 +0100 |
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>
---
crypto/init.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/crypto/init.c b/crypto/init.c
index fb7f1bff10..674d237fa9 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -34,14 +34,11 @@
#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)
{
#ifdef CONFIG_GNUTLS
@@ -53,10 +50,6 @@ int qcrypto_init(Error **errp)
gnutls_strerror(ret));
return -1;
}
-#ifdef DEBUG_GNUTLS
- gnutls_global_set_log_level(10);
- gnutls_global_set_log_function(qcrypto_gnutls_log);
-#endif
#endif
#ifdef CONFIG_GCRYPT
--
2.45.2
- [PULL 00/11] Crypto patches, Daniel P . Berrangé, 2024/07/24
- [PULL 01/11] crypto: Remove 'crypto-tls-x509-helpers.h' from crypto-tls-psk-helpers.c, Daniel P . Berrangé, 2024/07/24
- [PULL 02/11] crypto: Restrict pkix_asn1_tab[] to crypto-tls-x509-helpers.c, Daniel P . Berrangé, 2024/07/24
- [PULL 04/11] docs/devel: Add introduction to LUKS volume with detached header, Daniel P . Berrangé, 2024/07/24
- [PULL 03/11] crypto: Allow building with GnuTLS but without Libtasn1, Daniel P . Berrangé, 2024/07/24
- [PULL 07/11] meson: build chardev trace files when have_block, Daniel P . Berrangé, 2024/07/24
- [PULL 09/11] crypto: drop gnutls debug logging support,
Daniel P . Berrangé <=
- [PULL 06/11] qapi: drop unused QCryptoBlockCreateOptionsLUKS.detached-header, Daniel P . Berrangé, 2024/07/24
- [PULL 11/11] crypto: propagate errors from TLS session I/O callbacks, Daniel P . Berrangé, 2024/07/24
- [PULL 05/11] meson.build: fix libgcrypt detection on system without libgcrypt-config, Daniel P . Berrangé, 2024/07/24
- [PULL 08/11] chardev: add tracing of socket error conditions, Daniel P . Berrangé, 2024/07/24
- [PULL 10/11] crypto: push error reporting into TLS session I/O APIs, Daniel P . Berrangé, 2024/07/24
- Re: [PULL 00/11] Crypto patches, Richard Henderson, 2024/07/24