1
0
mirror of https://github.com/clearml/dropbear synced 2025-02-26 05:38:53 +00:00

Handle invalid agent keys by skipping rather than exiting.

My agent exposes both conventional keys and certs (ecdsa-sha2-nistp256-cert-v01@openssh.com) and I want dropbear to be able to use the former.
This commit is contained in:
Catalin Patulea 2015-01-01 17:47:46 -05:00
parent 634415f79e
commit d4609682af

View File

@ -210,13 +210,14 @@ static void agent_get_key_list(m_list * ret_list)
ret = buf_get_pub_key(key_buf, pubkey, &key_type);
buf_free(key_buf);
if (ret != DROPBEAR_SUCCESS) {
/* This is slack, properly would cleanup vars etc */
dropbear_exit("Bad pubkey received from agent");
}
pubkey->type = key_type;
pubkey->source = SIGNKEY_SOURCE_AGENT;
TRACE(("Skipping bad pubkey from agent"));
sign_key_free(pubkey);
} else {
pubkey->type = key_type;
pubkey->source = SIGNKEY_SOURCE_AGENT;
list_append(ret_list, pubkey);
list_append(ret_list, pubkey);
}
/* We'll ignore the comment for now. might want it later.*/
buf_eatstring(inbuf);