summaryrefslogtreecommitdiff
path: root/dbutil.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-08 23:12:35 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-08 23:12:35 +0800
commitc60df7d1a35acf7b1f25be488cbc09e7c24e0f4b (patch)
treeaceb7e3ecfd8d3210e8bb569b4a0d61d74f8d217 /dbutil.c
parentbceb7433b81737a3a205a6432e8f2ea7b53a5a26 (diff)
downloaddropbear-c60df7d1a35acf7b1f25be488cbc09e7c24e0f4b.tar.gz
add printmpint() for debugging
Diffstat (limited to 'dbutil.c')
-rw-r--r--dbutil.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dbutil.c b/dbutil.c
index 044388a..f2fe5b9 100644
--- a/dbutil.c
+++ b/dbutil.c
@@ -651,6 +651,14 @@ void printhex(const char * label, const unsigned char * buf, int len) {
}
fprintf(stderr, "\n");
}
+
+void printmpint(const char *label, mp_int *mp) {
+ buffer *buf = buf_new(1000);
+ buf_putmpint(buf, mp);
+ printhex(label, buf->data, buf->len);
+ buf_free(buf);
+
+}
#endif
/* Strip all control characters from text (a null-terminated string), except