Browse Subversion Repository
Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ssh.c
Parent Directory
| Revision Log
| Patch
| 4211 |
char* get_ssh_keytype_name(ssh_keytype type) |
char* get_ssh_keytype_name(ssh_keytype type) |
| 4212 |
{ |
{ |
| 4213 |
ssh2_host_key_t *ptr = ssh2_host_key; |
ssh2_host_key_t *ptr = ssh2_host_key; |
| 4214 |
static char buf[32]; |
char *p = "ssh-unknown"; |
| 4215 |
|
|
| 4216 |
while (ptr->name != NULL) { |
while (ptr->name != NULL) { |
| 4217 |
if (type == ptr->type) { |
if (type == ptr->type) { |
| 4218 |
strncpy_s(buf, sizeof(buf), ptr->name, _TRUNCATE); |
// ssh2_host_key[]はグローバル変数なので、そのまま返り値にできる。 |
| 4219 |
|
p = ptr->name; |
| 4220 |
break; |
break; |
| 4221 |
} |
} |
| 4222 |
ptr++; |
ptr++; |
| 4223 |
} |
} |
| 4224 |
return buf; |
return p; |
| 4225 |
} |
} |
| 4226 |
|
|
| 4227 |
|
|
|
|
Legend:
| Removed from v.5838 |
|
| changed lines |
| |
Added in v.5841 |
|
|
|