From 4cb5f64cd5455f0b6a99bbfc7f6e36b1987a4007 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 5 Aug 2019 02:28:24 +0200 Subject: lib: Fix swapped ECDH crypt calls The client and server side were swapped. This wasn't a big issue, but now we are sure that the flow allocation response for the server has arrived at the client (packet reordering could cause the server key to arrive before the flow is allocated at the client). Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/crypt.c b/src/lib/crypt.c index c9129a61..75284676 100644 --- a/src/lib/crypt.c +++ b/src/lib/crypt.c @@ -418,7 +418,7 @@ static int crypt_dh_srv(int fd, uint8_t * s) { #ifdef HAVE_OPENSSL - return openssl_ecdh_clt(fd, s); + return openssl_ecdh_srv(fd, s); #else (void) fd; @@ -432,7 +432,7 @@ static int crypt_dh_clt(int fd, uint8_t * s) { #ifdef HAVE_OPENSSL - return openssl_ecdh_srv(fd, s); + return openssl_ecdh_clt(fd, s); #else (void) fd; -- cgit v1.2.3