Ethereal-dev: Re: [Ethereal-dev] [PATCH] ssl decrypt debug code

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Thu, 9 Feb 2006 10:27:00 +0100
On Thu, Feb 09, 2006 at 10:58:40AM +0100, Paolo Abeni wrote:
> I worked a bit trying to handling better the debug messages generated by
> the ssl decrypt code. The attached patch add a preference to
> disable/enable to stderr/file the debug messages. The whole debug
> infrastructure can be disabled at compile time undefining the macro
> SSL_DECRYPT_DEBUG. 

I only applied the trivial part to ssl-dlg.c

Why do you do

-ssl_debug_printf("pcry_private_decrypt: can't decrypt key:%s\n",
-            gcry_strerror(rc));
+        if (ssl_debug_enabled())
+            ssl_debug_printf("pcry_private_decrypt: can't decrypt key:%s\n",
+                gcry_strerror(rc));

many many times instead of just patching ssl_debug_printf to start with the
ssl_debug_enabled() test? Making it a runtime/environment configurable
thing would be ok too, but that's just as you prefer it.

 Ciao
    Joerg