summaryrefslogtreecommitdiff
path: root/src
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 /src
parent5a4bd2f65b38a891237b3d73255eff3493082788 (diff)
downloadouroboros-0.17.2.tar.gz
ouroboros-0.17.2.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>
Diffstat (limited to 'src')
-rw-r--r--src/irmd/main.c5
1 files changed, 5 insertions, 0 deletions
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);