You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/01/30 07:54:17 UTC
[trafficserver] 02/03: Fix tests for QUICCrypto
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 150c1e0cfb1ab8dcefa3a24c1085fb6b270eef4e
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Jan 30 16:49:01 2018 +0900
Fix tests for QUICCrypto
---
iocore/net/quic/test/test_QUICCrypto.cc | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/iocore/net/quic/test/test_QUICCrypto.cc b/iocore/net/quic/test/test_QUICCrypto.cc
index 0720b33..aea6249 100644
--- a/iocore/net/quic/test/test_QUICCrypto.cc
+++ b/iocore/net/quic/test/test_QUICCrypto.cc
@@ -77,28 +77,31 @@ TEST_CASE("QUICCrypto Cleartext", "[quic]")
// Client Hello
uint8_t client_hello[MAX_HANDSHAKE_MSG_LEN] = {0};
size_t client_hello_len = 0;
- CHECK(client->handshake(client_hello, client_hello_len, MAX_HANDSHAKE_MSG_LEN, nullptr, 0));
+ CHECK(client->handshake(client_hello, client_hello_len, MAX_HANDSHAKE_MSG_LEN, nullptr, 0) == SSL_ERROR_WANT_READ);
std::cout << "Client Hello" << std::endl;
print_hex(client_hello, client_hello_len);
// Server Hello
uint8_t server_hello[MAX_HANDSHAKE_MSG_LEN] = {0};
size_t server_hello_len = 0;
- CHECK(server->handshake(server_hello, server_hello_len, MAX_HANDSHAKE_MSG_LEN, client_hello, client_hello_len));
+ CHECK(server->handshake(server_hello, server_hello_len, MAX_HANDSHAKE_MSG_LEN, client_hello, client_hello_len) ==
+ SSL_ERROR_WANT_READ);
std::cout << "Server Hello" << std::endl;
print_hex(server_hello, server_hello_len);
// Client Fnished
uint8_t client_finished[MAX_HANDSHAKE_MSG_LEN] = {0};
size_t client_finished_len = 0;
- CHECK(client->handshake(client_finished, client_finished_len, MAX_HANDSHAKE_MSG_LEN, server_hello, server_hello_len));
+ CHECK(client->handshake(client_finished, client_finished_len, MAX_HANDSHAKE_MSG_LEN, server_hello, server_hello_len) ==
+ SSL_ERROR_NONE);
std::cout << "Client Finished" << std::endl;
print_hex(client_finished, client_finished_len);
// Post Handshake Msg
uint8_t post_handshake_msg[MAX_HANDSHAKE_MSG_LEN] = {0};
size_t post_handshake_msg_len = 0;
- CHECK(server->handshake(post_handshake_msg, post_handshake_msg_len, MAX_HANDSHAKE_MSG_LEN, client_finished, client_finished_len));
+ CHECK(server->handshake(post_handshake_msg, post_handshake_msg_len, MAX_HANDSHAKE_MSG_LEN, client_finished,
+ client_finished_len) == SSL_ERROR_NONE);
std::cout << "Post Handshake Message" << std::endl;
print_hex(post_handshake_msg, post_handshake_msg_len);
@@ -163,28 +166,31 @@ TEST_CASE("QUICCrypto 1-RTT", "[quic]")
// Client Hello
uint8_t client_hello[MAX_HANDSHAKE_MSG_LEN] = {0};
size_t client_hello_len = 0;
- CHECK(client->handshake(client_hello, client_hello_len, MAX_HANDSHAKE_MSG_LEN, nullptr, 0));
+ CHECK(client->handshake(client_hello, client_hello_len, MAX_HANDSHAKE_MSG_LEN, nullptr, 0) == SSL_ERROR_WANT_READ);
std::cout << "Client Hello" << std::endl;
print_hex(client_hello, client_hello_len);
// Server Hello
uint8_t server_hello[MAX_HANDSHAKE_MSG_LEN] = {0};
size_t server_hello_len = 0;
- CHECK(server->handshake(server_hello, server_hello_len, MAX_HANDSHAKE_MSG_LEN, client_hello, client_hello_len));
+ CHECK(server->handshake(server_hello, server_hello_len, MAX_HANDSHAKE_MSG_LEN, client_hello, client_hello_len) ==
+ SSL_ERROR_WANT_READ);
std::cout << "Server Hello" << std::endl;
print_hex(server_hello, server_hello_len);
// Client Fnished
uint8_t client_finished[MAX_HANDSHAKE_MSG_LEN] = {0};
size_t client_finished_len = 0;
- CHECK(client->handshake(client_finished, client_finished_len, MAX_HANDSHAKE_MSG_LEN, server_hello, server_hello_len));
+ CHECK(client->handshake(client_finished, client_finished_len, MAX_HANDSHAKE_MSG_LEN, server_hello, server_hello_len) ==
+ SSL_ERROR_NONE);
std::cout << "Client Finished" << std::endl;
print_hex(client_finished, client_finished_len);
// Post Handshake Msg
uint8_t post_handshake_msg[MAX_HANDSHAKE_MSG_LEN] = {0};
size_t post_handshake_msg_len = 0;
- CHECK(server->handshake(post_handshake_msg, post_handshake_msg_len, MAX_HANDSHAKE_MSG_LEN, client_finished, client_finished_len));
+ CHECK(server->handshake(post_handshake_msg, post_handshake_msg_len, MAX_HANDSHAKE_MSG_LEN, client_finished,
+ client_finished_len) == SSL_ERROR_NONE);
std::cout << "Post Handshake Message" << std::endl;
print_hex(post_handshake_msg, post_handshake_msg_len);
--
To stop receiving notification emails like this one, please contact
masaori@apache.org.