Mercurial > dropbear
comparison svr-session.c @ 687:167fdc091c05
Improve RNG seeding.
Try to read from /dev/urandom multiple times, take input from extra sources,
and use /dev/random when generating private keys
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 29 Jun 2012 23:19:43 +0800 |
parents | c519b78b6d1a |
children | 78eda530c000 eafdf8b363f5 d1575fdc29a6 |
comparison
equal
deleted
inserted
replaced
683:63f8d6c469cf | 687:167fdc091c05 |
---|---|
73 }; | 73 }; |
74 | 74 |
75 void svr_session(int sock, int childpipe) { | 75 void svr_session(int sock, int childpipe) { |
76 char *host, *port; | 76 char *host, *port; |
77 size_t len; | 77 size_t len; |
78 reseedrandom(); | |
79 | 78 |
80 crypto_init(); | 79 crypto_init(); |
81 common_session_init(sock, sock); | 80 common_session_init(sock, sock); |
82 | 81 |
83 /* Initialise server specific parts of the session */ | 82 /* Initialise server specific parts of the session */ |