diff options
author | Matt Johnston <matt@ucc.asn.au> | 2004-07-28 16:44:16 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2004-07-28 16:44:16 +0000 |
commit | 2d82f73484e588e9367657a25331afd4aa0bf976 (patch) | |
tree | ba72557d5adc76bb9bf156c5e54e29bcd66df9d2 /rsa.c | |
parent | a76b1ba06868c1743837a5267efcbf2e07c9d81d (diff) |
Client mostly works up to password auth
Need to rework algo-choosing etc, since server is now broken.
--HG--
extra : convert_revision : 458dc4eed0e885e7c91633d4781d3348213a0e19
Diffstat (limited to 'rsa.c')
-rw-r--r-- | rsa.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -205,6 +205,8 @@ int buf_rsa_verify(buffer * buf, rsa_key *key, const unsigned char* data, mp_int *rsa_em = NULL; int ret = DROPBEAR_FAILURE; + TRACE(("enter buf_rsa_verify")); + assert(key != NULL); m_mp_init_multi(&rsa_mdash, &rsa_s, NULL); @@ -217,6 +219,7 @@ int buf_rsa_verify(buffer * buf, rsa_key *key, const unsigned char* data, if (mp_read_unsigned_bin(&rsa_s, buf_getptr(buf, buf->len - buf->pos), buf->len - buf->pos) != MP_OKAY) { + TRACE(("failed reading rsa_s")); goto out; } @@ -230,17 +233,20 @@ int buf_rsa_verify(buffer * buf, rsa_key *key, const unsigned char* data, rsa_em = rsa_pad_em(key, data, len); if (mp_exptmod(&rsa_s, key->e, key->n, &rsa_mdash) != MP_OKAY) { + TRACE(("failed exptmod rsa_s")); goto out; } if (mp_cmp(rsa_em, &rsa_mdash) == MP_EQ) { /* signature is valid */ + TRACE(("success!")); ret = DROPBEAR_SUCCESS; } out: mp_clear_multi(rsa_em, &rsa_mdash, &rsa_s, NULL); m_free(rsa_em); + TRACE(("leave buf_rsa_verify: ret %d", ret)); return ret; } |