static tree234 *rsakeys, *ssh2keys;
static int has_security;
-#ifndef NO_SECURITY
-DECL_WINDOWS_FUNCTION(extern, DWORD, GetSecurityInfo,
- (HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
- PSID *, PSID *, PACL *, PACL *,
- PSECURITY_DESCRIPTOR *));
-#endif
/*
* Forward references
}
for (i = 0; NULL != (skey = index234(ssh2keys, i)); i++) {
char *listentry, *p;
- int fp_len;
+ int pos, fp_len;
/*
- * Replace two spaces in the fingerprint with tabs, for
- * nice alignment in the box.
+ * Replace spaces with tabs in the fingerprint prefix, for
+ * nice alignment in the list box, until we encounter a :
+ * meaning we're into the fingerprint proper.
*/
p = skey->alg->fingerprint(skey->data);
listentry = dupprintf("%s\t%s", p, skey->comment);
fp_len = strlen(listentry);
sfree(p);
- p = strchr(listentry, ' ');
- if (p && p < listentry + fp_len)
- *p = '\t';
- p = strchr(listentry, ' ');
- if (p && p < listentry + fp_len)
- *p = '\t';
+ pos = 0;
+ while (1) {
+ pos += strcspn(listentry + pos, " :");
+ if (listentry[pos] == ':')
+ break;
+ listentry[pos++] = '\t';
+ }
SendDlgItemMessage(keylist, 100, LB_ADDSTRING, 0,
(LPARAM) listentry);
key->alg = &ssh_rsa;
else if (alglen == 7 && !memcmp(alg, "ssh-dss", 7))
key->alg = &ssh_dss;
+ else if (alglen == 19 && memcmp(alg, "ecdsa-sha2-nistp256", 19))
+ key->alg = &ssh_ecdsa_nistp256;
+ else if (alglen == 19 && memcmp(alg, "ecdsa-sha2-nistp384", 19))
+ key->alg = &ssh_ecdsa_nistp384;
+ else if (alglen == 19 && memcmp(alg, "ecdsa-sha2-nistp521", 19))
+ key->alg = &ssh_ecdsa_nistp521;
else {
sfree(key);
goto failure;
keylist = hwnd;
{
- static int tabs[] = { 35, 60, 210 };
+ static int tabs[] = { 35, 75, 250 };
SendDlgItemMessage(hwnd, 100, LB_SETTABSTOPS,
sizeof(tabs) / sizeof(*tabs),
(LPARAM) tabs);