diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-04-08 23:12:35 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-04-08 23:12:35 +0800 |
commit | c60df7d1a35acf7b1f25be488cbc09e7c24e0f4b (patch) | |
tree | aceb7e3ecfd8d3210e8bb569b4a0d61d74f8d217 /dbutil.c | |
parent | bceb7433b81737a3a205a6432e8f2ea7b53a5a26 (diff) | |
download | dropbear-c60df7d1a35acf7b1f25be488cbc09e7c24e0f4b.tar.gz |
add printmpint() for debugging
Diffstat (limited to 'dbutil.c')
-rw-r--r-- | dbutil.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |