mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 05:52:48 -05:00
Give rsa_fingerprint() a new name and API.
It's an SSH-1 specific function, so it should have a name reflecting that, and it didn't. Also it had one of those outdated APIs involving passing it a client-allocated buffer and size. Now it has a sensible name, and internally it constructs the output string using a strbuf and returns it dynamically allocated.
This commit is contained in:
@ -290,14 +290,16 @@ void keylist_update(void)
|
||||
if (keylist) {
|
||||
SendDlgItemMessage(keylist, 100, LB_RESETCONTENT, 0, 0);
|
||||
for (i = 0; NULL != (rkey = pageant_nth_ssh1_key(i)); i++) {
|
||||
char listentry[512], *p;
|
||||
char *listentry, *fp, *p;
|
||||
|
||||
fp = rsa_ssh1_fingerprint(rkey);
|
||||
listentry = dupprintf("ssh1\t%s", fp);
|
||||
sfree(fp);
|
||||
|
||||
/*
|
||||
* Replace two spaces in the fingerprint with tabs, for
|
||||
* nice alignment in the box.
|
||||
*/
|
||||
strcpy(listentry, "ssh1\t");
|
||||
p = listentry + strlen(listentry);
|
||||
rsa_fingerprint(p, sizeof(listentry) - (p - listentry), rkey);
|
||||
p = strchr(listentry, ' ');
|
||||
if (p)
|
||||
*p = '\t';
|
||||
@ -306,6 +308,7 @@ void keylist_update(void)
|
||||
*p = '\t';
|
||||
SendDlgItemMessage(keylist, 100, LB_ADDSTRING,
|
||||
0, (LPARAM) listentry);
|
||||
sfree(listentry);
|
||||
}
|
||||
for (i = 0; NULL != (skey = pageant_nth_ssh2_key(i)); i++) {
|
||||
char *listentry, *p;
|
||||
|
Reference in New Issue
Block a user