mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
Only read /dev/random once when the program starts
rather than for every connection, to "conserve entropy". --HG-- extra : convert_revision : 21df240b71c0af8454725dec9abb428dd4bb97a2
This commit is contained in:
@@ -76,12 +76,14 @@ static const struct ChanType *cli_chantypes[] = {
|
||||
|
||||
void cli_session(int sock, char* remotehost) {
|
||||
|
||||
seedrandom();
|
||||
|
||||
crypto_init();
|
||||
|
||||
common_session_init(sock, remotehost);
|
||||
|
||||
chaninitialise(cli_chantypes);
|
||||
|
||||
|
||||
/* Set up cli_ses vars */
|
||||
cli_session_init();
|
||||
|
||||
@@ -91,12 +93,8 @@ void cli_session(int sock, char* remotehost) {
|
||||
/* Exchange identification */
|
||||
session_identification();
|
||||
|
||||
seedrandom();
|
||||
|
||||
send_msg_kexinit();
|
||||
|
||||
/* XXX here we do stuff differently */
|
||||
|
||||
session_loop(cli_sessionloop);
|
||||
|
||||
/* Not reached */
|
||||
|
||||
Reference in New Issue
Block a user