Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/key.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6286 by yutakapon, Mon Feb 1 15:14:14 2016 UTC revision 6801 by doda, Tue Jun 13 10:30:12 2017 UTC
# Line 478  int key_verify(Key *key, Line 478  int key_verify(Key *key,
478          return (ret);   // success          return (ret);   // success
479  }  }
480    
481  static char FAR *copy_mp_int(char FAR * num)  static char *copy_mp_int(char *num)
482  {  {
483          int len = (get_ushort16_MSBfirst(num) + 7) / 8 + 2;          int len = (get_ushort16_MSBfirst(num) + 7) / 8 + 2;
484          char FAR *result = (char FAR *) malloc(len);          char *result = (char *) malloc(len);
485    
486          if (result != NULL) {          if (result != NULL) {
487                  memcpy(result, num, len);                  memcpy(result, num, len);
# Line 2081  static void hosts_updatekey_dlg_set_fing Line 2081  static void hosts_updatekey_dlg_set_fing
2081                                  strncat_s(buf, buf_len, "\r\n", _TRUNCATE);                                  strncat_s(buf, buf_len, "\r\n", _TRUNCATE);
2082                          }                          }
2083                  }                  }
2084                  SendDlgItemMessage(dlg, IDC_ADDKEY_EDIT, WM_SETTEXT, 0, (LPARAM)(char FAR *)buf);                  SendDlgItemMessage(dlg, IDC_ADDKEY_EDIT, WM_SETTEXT, 0, (LPARAM)(char *)buf);
2085                  free(buf);                  free(buf);
2086          }          }
2087    
2088          if (ctx->nold > 0) {          if (ctx->nold > 0) {
2089                  buf_len = 100 * ctx->nold;                  buf_len = 100 * ctx->nold;
2090                  buf = calloc(100, ctx->nold);                  buf = calloc(100, ctx->nold);
2091                  SendDlgItemMessage(dlg, IDC_REMOVEKEY_EDIT, WM_SETTEXT, 0, (LPARAM)(char FAR *)"");                  SendDlgItemMessage(dlg, IDC_REMOVEKEY_EDIT, WM_SETTEXT, 0, (LPARAM)(char *)"");
2092                  for (i = 0; i < ctx->nold; i++) {                  for (i = 0; i < ctx->nold; i++) {
2093                          switch (dgst_alg) {                          switch (dgst_alg) {
2094                          case SSH_DIGEST_MD5:                          case SSH_DIGEST_MD5:
# Line 2109  static void hosts_updatekey_dlg_set_fing Line 2109  static void hosts_updatekey_dlg_set_fing
2109                                  strncat_s(buf, buf_len, "\r\n", _TRUNCATE);                                  strncat_s(buf, buf_len, "\r\n", _TRUNCATE);
2110                          }                          }
2111                  }                  }
2112                  SendDlgItemMessage(dlg, IDC_REMOVEKEY_EDIT, WM_SETTEXT, 0, (LPARAM)(char FAR *)buf);                  SendDlgItemMessage(dlg, IDC_REMOVEKEY_EDIT, WM_SETTEXT, 0, (LPARAM)(char *)buf);
2113                  free(buf);                  free(buf);
2114          }          }
2115  }  }

Legend:
Removed from v.6286  
changed lines
  Added in v.6801

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26