зеркало из https://github.com/github/putty.git
Log the hash used for DH kex (now there's a choice).
[originally from svn r6605]
This commit is contained in:
Родитель
8e368671cc
Коммит
2cf27e43bb
3
ssh.c
3
ssh.c
|
@ -5519,7 +5519,8 @@ static int do_ssh2_transport(Ssh ssh, void *vin, int inlen,
|
|||
ssh->kex->groupname);
|
||||
}
|
||||
|
||||
logevent("Doing Diffie-Hellman key exchange");
|
||||
logeventf(ssh, "Doing Diffie-Hellman key exchange with hash %s",
|
||||
ssh->kex->hash->text_name);
|
||||
/*
|
||||
* Now generate and send e for Diffie-Hellman.
|
||||
*/
|
||||
|
|
1
ssh.h
1
ssh.h
|
@ -190,6 +190,7 @@ struct ssh_hash {
|
|||
void (*bytes)(void *, void *, int);
|
||||
void (*final)(void *, unsigned char *); /* also frees context */
|
||||
int hlen; /* output length in bytes */
|
||||
char *text_name;
|
||||
};
|
||||
|
||||
struct ssh_kex {
|
||||
|
|
|
@ -215,7 +215,7 @@ static void sha256_final(void *handle, unsigned char *output)
|
|||
}
|
||||
|
||||
const struct ssh_hash ssh_sha256 = {
|
||||
sha256_init, sha256_bytes, sha256_final, 32
|
||||
sha256_init, sha256_bytes, sha256_final, 32, "SHA-256"
|
||||
};
|
||||
|
||||
#ifdef TEST
|
||||
|
|
2
sshsha.c
2
sshsha.c
|
@ -217,7 +217,7 @@ static void sha1_final(void *handle, unsigned char *output)
|
|||
}
|
||||
|
||||
const struct ssh_hash ssh_sha1 = {
|
||||
sha1_init, sha1_bytes, sha1_final, 20
|
||||
sha1_init, sha1_bytes, sha1_final, 20, "SHA-1"
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче