summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2020-03-28 16:08:28 +0100
committerSander Vrijders <sander@ouroboros.rocks>2020-03-30 13:13:36 +0200
commit04a3795a70d6deb4840b30f5889e41ed42c85a6e (patch)
treeba73df2fcc0dcd270100b5189ec4512246522eb1
parent5a4bd2f65b38a891237b3d73255eff3493082788 (diff)
downloadouroboros-04a3795a70d6deb4840b30f5889e41ed42c85a6e.tar.gz
ouroboros-04a3795a70d6deb4840b30f5889e41ed42c85a6e.zip
irmd: Don't always send pub key in alloc response0.17.2
The allocation response was always containing an ECDHE key, which is not needed if the client doesn't request an encrypted flow. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/irmd/main.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8cce6a10..f9122b9e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@ include(GNUInstallDirs)
set(PACKAGE_VERSION_MAJOR 0)
set(PACKAGE_VERSION_MINOR 17)
-set(PACKAGE_VERSION_PATCH 1)
+set(PACKAGE_VERSION_PATCH 2)
set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(PACKAGE_DESCRIPTION "The Ouroboros prototype")
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 1c928dca..3709a3e5 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -1358,6 +1358,11 @@ static int flow_accept(pid_t pid,
pthread_rwlock_unlock(&irmd.reg_lock);
+ if (f->qs.cypher_s == 0) { /* no crypto requested, don't send pubkey */
+ data = NULL;
+ len = 0;
+ }
+
if (ipcp_flow_alloc_resp(pid_n1, flow_id, pid_n, 0, data, len)) {
pthread_rwlock_wrlock(&irmd.flows_lock);
list_del(&f->next);