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:
parent
634415f79e
commit
d4609682af
@ -210,13 +210,14 @@ static void agent_get_key_list(m_list * ret_list)
|
|||||||
ret = buf_get_pub_key(key_buf, pubkey, &key_type);
|
ret = buf_get_pub_key(key_buf, pubkey, &key_type);
|
||||||
buf_free(key_buf);
|
buf_free(key_buf);
|
||||||
if (ret != DROPBEAR_SUCCESS) {
|
if (ret != DROPBEAR_SUCCESS) {
|
||||||
/* This is slack, properly would cleanup vars etc */
|
TRACE(("Skipping bad pubkey from agent"));
|
||||||
dropbear_exit("Bad pubkey received from agent");
|
sign_key_free(pubkey);
|
||||||
}
|
} else {
|
||||||
pubkey->type = key_type;
|
pubkey->type = key_type;
|
||||||
pubkey->source = SIGNKEY_SOURCE_AGENT;
|
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.*/
|
/* We'll ignore the comment for now. might want it later.*/
|
||||||
buf_eatstring(inbuf);
|
buf_eatstring(inbuf);
|
||||||
|
Loading…
Reference in New Issue
Block a user