fix dss debug printing

--HG--
branch : fuzz
This commit is contained in:
Matt Johnston 2017-06-24 10:34:58 +08:00
parent 9b6f7fc9af
commit 17a9b8802f
2 changed files with 2 additions and 1 deletions

View File

@ -399,6 +399,7 @@ void printhex(const char * label, const unsigned char * buf, int len) {
void printmpint(const char *label, mp_int *mp) {
buffer *buf = buf_new(1000);
buf_putmpint(buf, mp);
fprintf(stderr, "%d bits ", mp_count_bits(mp));
printhex(label, buf->data, buf->len);
buf_free(buf);

2
dss.c
View File

@ -176,7 +176,7 @@ int buf_dss_verify(buffer* buf, dropbear_dss_key *key, buffer *data_buf) {
printmpint("dss verify p", key->p);
printmpint("dss verify q", key->q);
printmpint("dss verify g", key->g);
printmpint("dss verify x", key->x);
printmpint("dss verify y", key->y);
#endif
/* hash the data */