Client mostly works up to password auth

Need to rework algo-choosing etc, since server is now broken.

--HG--
extra : convert_revision : 458dc4eed0e885e7c91633d4781d3348213a0e19
This commit is contained in:
Matt Johnston
2004-07-28 16:44:16 +00:00
parent a76b1ba068
commit 2d82f73484
12 changed files with 57 additions and 14 deletions

4
dss.c
View File

@@ -45,6 +45,7 @@
* Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
int buf_get_dss_pub_key(buffer* buf, dss_key *key) {
TRACE(("enter buf_get_dss_pub_key"));
assert(key != NULL);
key->p = m_malloc(sizeof(mp_int));
key->q = m_malloc(sizeof(mp_int));
@@ -58,14 +59,17 @@ int buf_get_dss_pub_key(buffer* buf, dss_key *key) {
|| buf_getmpint(buf, key->q) == DROPBEAR_FAILURE
|| buf_getmpint(buf, key->g) == DROPBEAR_FAILURE
|| buf_getmpint(buf, key->y) == DROPBEAR_FAILURE) {
TRACE(("leave buf_get_dss_pub_key: failed reading mpints"));
return DROPBEAR_FAILURE;
}
if (mp_count_bits(key->p) < MIN_DSS_KEYLEN) {
dropbear_log(LOG_WARNING, "DSS key too short");
TRACE(("leave buf_get_dss_pub_key: short key"));
return DROPBEAR_FAILURE;
}
TRACE(("leave buf_get_dss_pub_key: success"));
return DROPBEAR_SUCCESS;
}