agent: Use sshkey plugin to parse keys, adds support for ECDSA

This commit is contained in:
Tobias Brunner
2013-05-07 17:08:31 +02:00
parent dd9e366814
commit e07e489d5f
4 changed files with 71 additions and 59 deletions
+3 -1
View File
@@ -148,7 +148,7 @@ static void load_agent(private_cmd_creds_t *this)
}
privkey = lib->creds->create(lib->creds, CRED_PRIVATE_KEY,
KEY_RSA, BUILD_AGENT_SOCKET, agent, BUILD_END);
KEY_ANY, BUILD_AGENT_SOCKET, agent, BUILD_END);
if (!privkey)
{
DBG1(DBG_CFG, "failed to load private key from ssh-agent");
@@ -200,6 +200,8 @@ METHOD(cmd_creds_t, handle, bool,
if (this->agent && this->identity)
{
load_agent(this);
/* only do this once */
this->agent = FALSE;
}
return TRUE;
}