From 6a695b76cbe3d106c05bbde09709ba0128b6e11b Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 30 Jun 2017 11:48:59 -0700 Subject: [PATCH] Fixed server side case for DH agree issue with QAT hardware where agreeSz is not set. Fix to allow QAT start failure to continue (this is useful since only one process can use hardware with default QAT configuration). --- src/internal.c | 4 ++++ wolfcrypt/src/wc_port.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index b7956639f..aea6e7a31 100755 --- a/src/internal.c +++ b/src/internal.c @@ -18191,6 +18191,7 @@ int SendClientKeyExchange(WOLFSSL* ssl) ssl->buffers.sig.buffer, &ssl->buffers.sig.length, args->encSecret, &args->encSz); + /* set the max agree result size */ ssl->arrays->preMasterSz = ENCRYPT_LEN; break; } @@ -23336,6 +23337,9 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, ssl->buffers.serverDH_P.length, ssl->buffers.serverDH_G.buffer, ssl->buffers.serverDH_G.length); + + /* set the max agree result size */ + ssl->arrays->preMasterSz = ENCRYPT_LEN; break; } #endif /* !NO_DH */ diff --git a/wolfcrypt/src/wc_port.c b/wolfcrypt/src/wc_port.c index 3345e0f55..559fea1e4 100755 --- a/wolfcrypt/src/wc_port.c +++ b/wolfcrypt/src/wc_port.c @@ -80,7 +80,7 @@ int wolfCrypt_Init(void) ret = wolfAsync_HardwareStart(); if (ret != 0) { WOLFSSL_MSG("Async hardware start failed"); - return ret; + /* don't return failure, allow operation to continue */ } #endif