diff --git a/tests/unit/s2n_record_read_test.c b/tests/unit/s2n_record_read_test.c index 5a0896705c6..51d2a45825c 100644 --- a/tests/unit/s2n_record_read_test.c +++ b/tests/unit/s2n_record_read_test.c @@ -202,7 +202,10 @@ int main(int argc, char *argv[]) EXPECT_OK(s2n_connections_set_io_stuffer_pair(client, server, &stuffer_pair)); EXPECT_SUCCESS(s2n_negotiate_test_server_and_client(server, client)); - EXPECT_EQUAL(server->actual_protocol_version, security_policy_test_cases[i].expected_protocol_version); + /* If the underlying libcrypto doesn't support TLS 1.3, TLS 1.2 will be negotiated. */ + if (s2n_is_tls13_fully_supported()) { + EXPECT_EQUAL(server->actual_protocol_version, security_policy_test_cases[i].expected_protocol_version); + } /* Send some test data to the server. */ uint8_t test_data[] = "hello world";