This commit is contained in:
manojampalam 2016-05-02 22:55:48 -07:00
parent 722e93615b
commit abea0182ac
2 changed files with 6 additions and 1 deletions

View File

@ -104,6 +104,9 @@ static int sign_blob(const struct sshkey *pubkey, u_char ** sig, size_t *siglen,
DWORD regdatalen = 0; DWORD regdatalen = 0;
struct sshbuf* tmpbuf; struct sshbuf* tmpbuf;
regdata = malloc(4);
regdatalen = 4;
*sig = NULL; *sig = NULL;
*siglen = 0; *siglen = 0;
@ -118,7 +121,7 @@ static int sign_blob(const struct sshkey *pubkey, u_char ** sig, size_t *siglen,
NULL, &sub, NULL)) != 0) NULL, &sub, NULL)) != 0)
goto done; goto done;
if ((RegQueryValueEx(sub, NULL, 0, NULL, NULL, &regdatalen)) != ERROR_MORE_DATA) { if ((RegQueryValueEx(sub, NULL, 0, NULL, regdata, &regdatalen)) != ERROR_MORE_DATA) {
r = EOTHER; r = EOTHER;
goto done; goto done;
} }

View File

@ -139,6 +139,8 @@ process_request(struct agent_connection* con) {
r = process_request_identities(request, response, con->client_token); r = process_request_identities(request, response, con->client_token);
break; break;
case SSH2_AGENTC_SIGN_REQUEST: case SSH2_AGENTC_SIGN_REQUEST:
r = process_sign_request(request, response, con->client_token);
break;
default: default:
r = EINVAL; r = EINVAL;
goto done; goto done;