summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2019-08-05 02:28:24 +0200
committerSander Vrijders <sander@ouroboros.rocks>2019-08-09 19:44:06 +0200
commit4cb5f64cd5455f0b6a99bbfc7f6e36b1987a4007 (patch)
tree378c55900004e86ee4a40148309972c4f5c9c463
parent8114ba43c09ebb45ee6e1c608f23e27577130ebf (diff)
downloadouroboros-4cb5f64cd5455f0b6a99bbfc7f6e36b1987a4007.tar.gz
ouroboros-4cb5f64cd5455f0b6a99bbfc7f6e36b1987a4007.zip
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 <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
-rw-r--r--src/lib/crypt.c4
1 files changed, 2 insertions, 2 deletions
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;