mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Fix Checks
1. In the client, check the return code on wolfSSL_CTX_SetMinDhKey_Sz() as it is checked in the server. (Resolves issue #2037.) 2. In HashOutput(), check that the hsHashes exists for the session before hashing. (Resolves issue #2038.)
This commit is contained in:
@ -2122,7 +2122,10 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
wolfSSL_CTX_set_group_messages(ctx);
|
||||
|
||||
#ifndef NO_DH
|
||||
wolfSSL_CTX_SetMinDhKey_Sz(ctx, (word16)minDhKeyBits);
|
||||
if (wolfSSL_CTX_SetMinDhKey_Sz(ctx, (word16)minDhKeyBits)
|
||||
!= WOLFSSL_SUCCESS) {
|
||||
err_sys("Error setting minimum DH key size");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (usePsk) {
|
||||
|
@ -6479,6 +6479,9 @@ int HashOutput(WOLFSSL* ssl, const byte* output, int sz, int ivSz)
|
||||
int ret = 0;
|
||||
const byte* adj;
|
||||
|
||||
if (ssl->hsHashes == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
adj = output + RECORD_HEADER_SZ + ivSz;
|
||||
sz -= RECORD_HEADER_SZ;
|
||||
|
||||
|
Reference in New Issue
Block a user