From 8edd7d0b17e92acd992872bc1cbc82e33209d7e0 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 17 Jan 2019 10:32:34 -0800 Subject: [PATCH] Fix Checks 1. In the tls_bench, check the return code on wolfSSL_CTX_SetMinDhKey_Sz() as it is checked in the examples. --- examples/benchmark/tls_bench.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/benchmark/tls_bench.c b/examples/benchmark/tls_bench.c index 500da37b7..9440adbcc 100644 --- a/examples/benchmark/tls_bench.c +++ b/examples/benchmark/tls_bench.c @@ -643,7 +643,11 @@ static int bench_tls_client(info_t* info) } #ifndef NO_DH - wolfSSL_CTX_SetMinDhKey_Sz(cli_ctx, MIN_DHKEY_BITS); + ret = wolfSSL_CTX_SetMinDhKey_Sz(cli_ctx, MIN_DHKEY_BITS); + if (ret != WOLFSSL_SUCCESS) { + printf("Error setting minimum DH key size\n"); + goto exit; + } #endif /* Allocate and initialize a packet sized buffer */ @@ -960,7 +964,11 @@ static int bench_tls_server(info_t* info) } #ifndef NO_DH - wolfSSL_CTX_SetMinDhKey_Sz(srv_ctx, MIN_DHKEY_BITS); + ret = wolfSSL_CTX_SetMinDhKey_Sz(srv_ctx, MIN_DHKEY_BITS); + if (ret != WOLFSSL_SUCCESS) { + printf("Error setting minimum DH key size\n"); + goto exit; + } #endif /* Allocate read buffer */