diff --git a/contrib/win32/win32compat/ssh-agent/agent-request.h b/contrib/win32/win32compat/ssh-agent/agent-request.h index 9cec7de57c5f..7367ddade4cd 100644 --- a/contrib/win32/win32compat/ssh-agent/agent-request.h +++ b/contrib/win32/win32compat/ssh-agent/agent-request.h @@ -11,6 +11,7 @@ typedef unsigned __int64 u_int64_t; /* key management */ +int process_unsupported_request(struct sshbuf*, struct sshbuf*, struct agent_connection*); int process_add_identity(struct sshbuf*, struct sshbuf*, struct agent_connection*); int process_request_identities(struct sshbuf*, struct sshbuf*, struct agent_connection*); int process_sign_request(struct sshbuf*, struct sshbuf*, struct agent_connection*); diff --git a/contrib/win32/win32compat/ssh-agent/connection.c b/contrib/win32/win32compat/ssh-agent/connection.c index 199ab201aceb..ad6aa668cdeb 100644 --- a/contrib/win32/win32compat/ssh-agent/connection.c +++ b/contrib/win32/win32compat/ssh-agent/connection.c @@ -134,6 +134,13 @@ process_request(struct agent_connection* con) debug("process agent request type %d", type); switch (type) { + case SSH_AGENTC_REQUEST_RSA_IDENTITIES: + case SSH_AGENTC_RSA_CHALLENGE: + case SSH_AGENTC_ADD_RSA_IDENTITY: + case SSH_AGENTC_REMOVE_RSA_IDENTITY: + case SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES: + r = process_unsupported_request(request, response, con); + break; case SSH2_AGENTC_ADD_IDENTITY: r = process_add_identity(request, response, con); break; @@ -175,4 +182,4 @@ process_request(struct agent_connection* con) return r; } -#pragma warning(pop) \ No newline at end of file +#pragma warning(pop) diff --git a/contrib/win32/win32compat/ssh-agent/keyagent-request.c b/contrib/win32/win32compat/ssh-agent/keyagent-request.c index 9714bcfbc7ad..8f27e0a48e43 100644 --- a/contrib/win32/win32compat/ssh-agent/keyagent-request.c +++ b/contrib/win32/win32compat/ssh-agent/keyagent-request.c @@ -115,6 +115,16 @@ convert_blob(struct agent_connection* con, const char *blob, DWORD blen, char ** #define REG_KEY_SDDL L"D:P(A;; GA;;; SY)(A;; GA;;; BA)" +int +process_unsupported_request(struct sshbuf* request, struct sshbuf* response, struct agent_connection* con) +{ + int r = 0; + debug("ssh protocol 1 is not supported"); + if (sshbuf_put_u8(response, SSH_AGENT_FAILURE) != 0) + r = -1; + return r; +} + int process_add_identity(struct sshbuf* request, struct sshbuf* response, struct agent_connection* con) {