diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2020-03-28 16:08:28 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2020-03-30 13:13:36 +0200 |
commit | 04a3795a70d6deb4840b30f5889e41ed42c85a6e (patch) | |
tree | ba73df2fcc0dcd270100b5189ec4512246522eb1 /src/irmd | |
parent | 5a4bd2f65b38a891237b3d73255eff3493082788 (diff) | |
download | ouroboros-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>
Diffstat (limited to 'src/irmd')
-rw-r--r-- | src/irmd/main.c | 5 |
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); |