diff options
author | Dimitri Staessens <[email protected]> | 2020-12-09 22:18:13 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2020-12-12 11:37:56 +0100 |
commit | 54f632767df709f6afb87ba37c7ee0b71a2bdbce (patch) | |
tree | 175ccb7374d5a7a093b2d1e4a91a61cbcf8a84da /src/lib/dev.c | |
parent | d345436f01e64dfe595783d13b45d6a341256e3e (diff) | |
download | ouroboros-54f632767df709f6afb87ba37c7ee0b71a2bdbce.tar.gz ouroboros-54f632767df709f6afb87ba37c7ee0b71a2bdbce.zip |
lib: Fix flow_accept without openssl
DH key creation was returning -ECRYPT if opennssl is not installed,
instead of success (0).
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r-- | src/lib/dev.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c index a6be762b..0a783bf7 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -552,10 +552,11 @@ int flow_accept(qosspec_t * qs, err = -ECRYPT; goto fail_crypt_pkp; } - - msg.has_pk = true; - msg.pk.data = buf; - msg.pk.len = (uint32_t) key_len; + if (key_len > 0) { + msg.has_pk = true; + msg.pk.data = buf; + msg.pk.len = (uint32_t) key_len; + } pthread_cleanup_push(crypt_dh_pkp_destroy, pkp); |