mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Log the hash used for DH kex (now there's a choice).
[originally from svn r6605]
This commit is contained in:
parent
8e368671cc
commit
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);
|
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.
|
* 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 (*bytes)(void *, void *, int);
|
||||||
void (*final)(void *, unsigned char *); /* also frees context */
|
void (*final)(void *, unsigned char *); /* also frees context */
|
||||||
int hlen; /* output length in bytes */
|
int hlen; /* output length in bytes */
|
||||||
|
char *text_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ssh_kex {
|
struct ssh_kex {
|
||||||
|
@ -215,7 +215,7 @@ static void sha256_final(void *handle, unsigned char *output)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const struct ssh_hash ssh_sha256 = {
|
const struct ssh_hash ssh_sha256 = {
|
||||||
sha256_init, sha256_bytes, sha256_final, 32
|
sha256_init, sha256_bytes, sha256_final, 32, "SHA-256"
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef TEST
|
#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 = {
|
const struct ssh_hash ssh_sha1 = {
|
||||||
sha1_init, sha1_bytes, sha1_final, 20
|
sha1_init, sha1_bytes, sha1_final, 20, "SHA-1"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user