Merge pull request #6053 from JacobBarthelmeh/freebsd

fix DTLS test case for when able to read peers close notify alert
pull/6056/head
David Garske 2023-02-03 14:10:33 -08:00 committed by GitHub
commit 646b363e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -57831,8 +57831,11 @@ static int test_wolfSSL_dtls_fragments(void)
AssertFalse(func_cb_server.return_code);
/* The socket should be closed by the server resulting in a
* socket error */
AssertIntEQ(func_cb_client.last_err, SOCKET_ERROR_E);
* socket error or reading a close notify alert */
if (func_cb_client.last_err != SOCKET_ERROR_E &&
func_cb_client.last_err != WOLFSSL_ERROR_ZERO_RETURN) {
AssertIntEQ(func_cb_client.last_err, SOCKET_ERROR_E);
}
/* Check the server returned an error indicating the msg buffer
* was full */
AssertIntEQ(func_cb_server.last_err, DTLS_TOO_MANY_FRAGMENTS_E);