Skip to content

Commit

Permalink
Finished server handshake errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anarthal committed Dec 22, 2023
1 parent 0afa3d3 commit 2b6a40c
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions test/unit/test/protocol/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,23 @@ BOOST_AUTO_TEST_CASE(deserialize_server_hello_impl_error)
0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64}, // no NULL terminator
client_errc::incomplete_message
},
// TODO: rest of fields
{
"no_plugin_auth_capability",
{0x2e, 0x31, 0x00,
0x02, 0x00, 0x00, 0x00,
0x52, 0x1a, 0x50, 0x3a, 0x4b, 0x12, 0x70, 0x2f,
0x00,
0xff, 0xf7,
0x08, // charset
0x02, 0x00,
0xf7, 0x81, // caps high - no CLIENT_PLUGIN_AUTH
0x00, // auth plugin data len
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved
0x03, 0x5a, 0x74, 0x05, 0x28, 0x2b, 0x7f, 0x21, 0x43, 0x4a, 0x21, 0x62, 0x00, // plugin data 2
},
client_errc::server_unsupported
}
// clang-format on
};

for (const auto& tc : test_cases)
Expand All @@ -1669,23 +1685,6 @@ BOOST_AUTO_TEST_CASE(deserialize_server_hello_impl_error)
BOOST_TEST(err == tc.expected_err);
}
}

// unsigned char a[] = {
// 0x2e, 0x31, 0x00,
// 0x02, 0x00, 0x00, 0x00,
// 0x52, 0x1a, 0x50, 0x3a, 0x4b, 0x12, 0x70, 0x2f,
// 0x00,
// 0xff, 0xf7,
// 0x08, // charset
// 0x02, 0x00,
// 0xff, 0x81, // caps high
// 0x15, // auth plugin data len
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved
// 0x03, 0x5a, 0x74, 0x05, 0x28, 0x2b, 0x7f, 0x21, 0x43, 0x4a, 0x21, 0x62, 0x00, // plugin data 2
// // plugin name
// 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x6e, 0x61, 0x74,
// 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x00};
// clang-format on
}

//
Expand Down

0 comments on commit 2b6a40c

Please sign in to comment.