• R/O
  • R/W (SSH)
  • R/W (HTTPS)

ttssh2: コミット


コミットメタ情報

リビジョン6642 (tree)
日時2017-03-20 21:39:14
作者doda

ログメッセージ

PuTTY 0.68対応

agent_query() の返り値が変わり Windows では常に NULL を返すようになったので
とりあえず返り値のチェックをやめた。

変更サマリ

差分

--- trunk/ttssh2/ttxssh/ssh.c (revision 6641)
+++ trunk/ttssh2/ttxssh/ssh.c (revision 6642)
@@ -9085,8 +9085,8 @@
90859085 }
90869086
90879087 req_len = get_uint32_MSBfirst(data);
9088- retval = agent_query(data, req_len + 4, &response, &resplen, NULL, NULL);
9089- if (retval != 1 || resplen < 5) {
9088+ agent_query(data, req_len + 4, &response, &resplen, NULL, NULL);
9089+ if (response == NULL || resplen < 5) {
90909090 // この channel を閉じる
90919091 if (SSHv2(pvar)) {
90929092 ssh2_channel_send_close(pvar, c);
--- trunk/ttssh2/putty/libputty.c (revision 6641)
+++ trunk/ttssh2/putty/libputty.c (revision 6642)
@@ -46,7 +46,7 @@
4646
4747 unsigned char *request, *response;
4848 void *vresponse;
49- int resplen, retval;
49+ int resplen;
5050 int pubkeylen, datalen, reqlen;
5151
5252 pubkeylen = GET_32BIT(pubkey);
@@ -63,8 +63,8 @@
6363 // sign data (length + data)
6464 memcpy(request + 5 + 4 + pubkeylen, data, 4 + datalen);
6565
66- retval = agent_query(request, reqlen, &vresponse, &resplen, NULL, NULL);
67- assert(retval == 1);
66+ agent_query(request, reqlen, &vresponse, &resplen, NULL, NULL);
67+
6868 response = vresponse;
6969 if (resplen < 5 || response[4] != SSH2_AGENT_SIGN_RESPONSE) {
7070 sfree(response);
@@ -113,7 +113,7 @@
113113
114114 unsigned char *request, *response, *p;
115115 void *vresponse;
116- int resplen, retval;
116+ int resplen;
117117 int reqlen;
118118
119119 reqlen = 4 + 1 + pubkeylen + datalen + 16 + 4;
@@ -138,8 +138,8 @@
138138 // terminator?
139139 PUT_32BIT(p, 1);
140140
141- retval = agent_query(request, reqlen, &vresponse, &resplen, NULL, NULL);
142- assert(retval == 1);
141+ agent_query(request, reqlen, &vresponse, &resplen, NULL, NULL);
142+
143143 response = vresponse;
144144 if (resplen < 5 || response[4] != SSH1_AGENT_RSA_RESPONSE) {
145145 sfree(response);
@@ -278,12 +278,12 @@
278278
279279 unsigned char request[5], *response;
280280 void *vresponse;
281- int resplen, retval;
281+ int resplen;
282282 request[4] = SSH1_AGENTC_REQUEST_RSA_IDENTITIES;
283283 PUT_32BIT(request, 1);
284284
285- retval = agent_query(request, 5, &vresponse, &resplen, NULL, NULL);
286- assert(retval == 1);
285+ agent_query(request, 5, &vresponse, &resplen, NULL, NULL);
286+
287287 response = vresponse;
288288 if (resplen < 5 || response[4] != SSH1_AGENT_RSA_IDENTITIES_ANSWER) {
289289 sfree(response);
@@ -312,13 +312,13 @@
312312
313313 unsigned char request[5], *response;
314314 void *vresponse;
315- int resplen, retval;
315+ int resplen;
316316
317317 request[4] = SSH2_AGENTC_REQUEST_IDENTITIES;
318318 PUT_32BIT(request, 1);
319319
320- retval = agent_query(request, 5, &vresponse, &resplen, NULL, NULL);
321- assert(retval == 1);
320+ agent_query(request, 5, &vresponse, &resplen, NULL, NULL);
321+
322322 response = vresponse;
323323 if (resplen < 5 || response[4] != SSH2_AGENT_IDENTITIES_ANSWER) {
324324 sfree(response);
--- trunk/ttssh2/putty/libputty.h (revision 6641)
+++ trunk/ttssh2/putty/libputty.h (revision 6642)
@@ -8,7 +8,7 @@
88
99 // WINDOWS\WINPGNTC.C
1010 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,
1212 void (*callback)(void *, void *, int), void *callback_ctx);
1313
1414 int putty_get_ssh2_keylist(unsigned char **keylist);
旧リポジトリブラウザで表示