修訂 | 6643 (tree) |
---|---|
時間 | 2017-03-21 00:31:21 |
作者 | (del#24082) |
trunkからリビジョン6642をマージ
@@ -46,7 +46,7 @@ | ||
46 | 46 | |
47 | 47 | unsigned char *request, *response; |
48 | 48 | void *vresponse; |
49 | - int resplen, retval; | |
49 | + int resplen; | |
50 | 50 | int pubkeylen, datalen, reqlen; |
51 | 51 | |
52 | 52 | pubkeylen = GET_32BIT(pubkey); |
@@ -63,8 +63,8 @@ | ||
63 | 63 | // sign data (length + data) |
64 | 64 | memcpy(request + 5 + 4 + pubkeylen, data, 4 + datalen); |
65 | 65 | |
66 | - retval = agent_query(request, reqlen, &vresponse, &resplen, NULL, NULL); | |
67 | - assert(retval == 1); | |
66 | + agent_query(request, reqlen, &vresponse, &resplen, NULL, NULL); | |
67 | + | |
68 | 68 | response = vresponse; |
69 | 69 | if (resplen < 5 || response[4] != SSH2_AGENT_SIGN_RESPONSE) { |
70 | 70 | sfree(response); |
@@ -113,7 +113,7 @@ | ||
113 | 113 | |
114 | 114 | unsigned char *request, *response, *p; |
115 | 115 | void *vresponse; |
116 | - int resplen, retval; | |
116 | + int resplen; | |
117 | 117 | int reqlen; |
118 | 118 | |
119 | 119 | reqlen = 4 + 1 + pubkeylen + datalen + 16 + 4; |
@@ -138,8 +138,8 @@ | ||
138 | 138 | // terminator? |
139 | 139 | PUT_32BIT(p, 1); |
140 | 140 | |
141 | - retval = agent_query(request, reqlen, &vresponse, &resplen, NULL, NULL); | |
142 | - assert(retval == 1); | |
141 | + agent_query(request, reqlen, &vresponse, &resplen, NULL, NULL); | |
142 | + | |
143 | 143 | response = vresponse; |
144 | 144 | if (resplen < 5 || response[4] != SSH1_AGENT_RSA_RESPONSE) { |
145 | 145 | sfree(response); |
@@ -278,12 +278,12 @@ | ||
278 | 278 | |
279 | 279 | unsigned char request[5], *response; |
280 | 280 | void *vresponse; |
281 | - int resplen, retval; | |
281 | + int resplen; | |
282 | 282 | request[4] = SSH1_AGENTC_REQUEST_RSA_IDENTITIES; |
283 | 283 | PUT_32BIT(request, 1); |
284 | 284 | |
285 | - retval = agent_query(request, 5, &vresponse, &resplen, NULL, NULL); | |
286 | - assert(retval == 1); | |
285 | + agent_query(request, 5, &vresponse, &resplen, NULL, NULL); | |
286 | + | |
287 | 287 | response = vresponse; |
288 | 288 | if (resplen < 5 || response[4] != SSH1_AGENT_RSA_IDENTITIES_ANSWER) { |
289 | 289 | sfree(response); |
@@ -312,13 +312,13 @@ | ||
312 | 312 | |
313 | 313 | unsigned char request[5], *response; |
314 | 314 | void *vresponse; |
315 | - int resplen, retval; | |
315 | + int resplen; | |
316 | 316 | |
317 | 317 | request[4] = SSH2_AGENTC_REQUEST_IDENTITIES; |
318 | 318 | PUT_32BIT(request, 1); |
319 | 319 | |
320 | - retval = agent_query(request, 5, &vresponse, &resplen, NULL, NULL); | |
321 | - assert(retval == 1); | |
320 | + agent_query(request, 5, &vresponse, &resplen, NULL, NULL); | |
321 | + | |
322 | 322 | response = vresponse; |
323 | 323 | if (resplen < 5 || response[4] != SSH2_AGENT_IDENTITIES_ANSWER) { |
324 | 324 | sfree(response); |
@@ -8,7 +8,7 @@ | ||
8 | 8 | |
9 | 9 | // WINDOWS\WINPGNTC.C |
10 | 10 | extern int agent_exists(void); |
11 | -extern int agent_query(void *in, int inlen, void **out, int *outlen, | |
11 | +extern void *agent_query(void *in, int inlen, void **out, int *outlen, | |
12 | 12 | void (*callback)(void *, void *, int), void *callback_ctx); |
13 | 13 | |
14 | 14 | int putty_get_ssh2_keylist(unsigned char **keylist); |
@@ -9130,8 +9130,8 @@ | ||
9130 | 9130 | } |
9131 | 9131 | |
9132 | 9132 | req_len = get_uint32_MSBfirst(data); |
9133 | - retval = agent_query(data, req_len + 4, &response, &resplen, NULL, NULL); | |
9134 | - if (retval != 1 || resplen < 5) { | |
9133 | + agent_query(data, req_len + 4, &response, &resplen, NULL, NULL); | |
9134 | + if (response == NULL || resplen < 5) { | |
9135 | 9135 | // この channel を閉じる |
9136 | 9136 | if (SSHv2(pvar)) { |
9137 | 9137 | ssh2_channel_send_close(pvar, c); |