1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-12 15:41:16 +03:00

packet: Implement rekeying based on the recommendation from RFC's

The default rekeying recommendations are specified in
RFC4344 Section 3 (First and Second Rekeying Recommendations).
Additionally, the rekeying can be specified in configuration
file/options allowing us to turn the rekeying off, base it
on time or make it more strict.

The code is highly inspired by the OpenSSH rekeying code.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Daiki Ueno <dueno@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2018-11-15 13:43:18 +01:00
committed by Andreas Schneider
parent c86a00d06b
commit 58cae2366a
6 changed files with 248 additions and 6 deletions

View File

@@ -82,7 +82,8 @@ static int dh_handshake_server(ssh_session session);
* options that are currently set in the given ssh_session structure.
*/
static int server_set_kex(ssh_session session) {
int server_set_kex(ssh_session session)
{
struct ssh_kex_struct *server = &session->next_crypto->server_kex;
int i, j, rc;
const char *wanted;