# HG changeset patch # User Matt Johnston # Date 1393246412 -28800 # Node ID 4a74c58e11fc148d8a5fd56012941d82f82ae2a3 # Parent 4696755c4cacb8f03c2c4283ef90ef40a9447af7 Make some debug info conditional diff -r 4696755c4cac -r 4a74c58e11fc common-kex.c --- a/common-kex.c Sat Feb 22 18:02:09 2014 +0800 +++ b/common-kex.c Mon Feb 24 20:53:32 2014 +0800 @@ -789,9 +789,11 @@ hash_desc->done(&hs, buf_getwriteptr(ses.hash, hash_desc->hashsize)); buf_setlen(ses.hash, hash_desc->hashsize); -#ifdef DEBUG_KEXHASH - printhex("kexhashbuf", ses.kexhashbuf->data, ses.kexhashbuf->len); - printhex("kexhash", ses.hash->data, ses.hash->len); +#if defined(DEBUG_KEXHASH) && defined(DEBUG_TRACE) + if (!debug_trace) { + printhex("kexhashbuf", ses.kexhashbuf->data, ses.kexhashbuf->len); + printhex("kexhash", ses.hash->data, ses.hash->len); + } #endif buf_burn(ses.kexhashbuf); diff -r 4696755c4cac -r 4a74c58e11fc rsa.c --- a/rsa.c Sat Feb 22 18:02:09 2014 +0800 +++ b/rsa.c Mon Feb 24 20:53:32 2014 +0800 @@ -347,7 +347,9 @@ mp_clear(&rsa_s); #if defined(DEBUG_RSA) && defined(DEBUG_TRACE) - printhex("RSA sig", buf->data, buf->len); + if (!debug_trace) { + printhex("RSA sig", buf->data, buf->len); + } #endif