changeset 907:4a74c58e11fc

Make some debug info conditional
author Matt Johnston <matt@ucc.asn.au>
date Mon, 24 Feb 2014 20:53:32 +0800
parents 4696755c4cac
children 89555751c489 e630c7aecff7
files common-kex.c rsa.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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