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:15 UTC

[trafficserver] branch quic-latest updated (4e7658b -> 3f4fe3d)

This is an automated email from the ASF dual-hosted git repository.

masaori pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 4e7658b  [QUIC Client] Load params from records.config
     new d313bba  Print TLS Version on debug log
     new 150c1e0  Fix tests for QUICCrypto
     new 3f4fe3d  Fix tests for QUICHandshake

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 iocore/net/QUICNetProcessor.cc             |  6 ++++++
 iocore/net/quic/test/test_QUICCrypto.cc    | 22 ++++++++++++++--------
 iocore/net/quic/test/test_QUICHandshake.cc |  2 ++
 3 files changed, 22 insertions(+), 8 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
masaori@apache.org.

[trafficserver] 03/03: Fix tests for QUICHandshake

Posted by ma...@apache.org.
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 3f4fe3d4d28d33e6fc67df14d1600d89ff32e65f
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Jan 30 16:54:00 2018 +0900

    Fix tests for QUICHandshake
---
 iocore/net/quic/test/test_QUICHandshake.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/iocore/net/quic/test/test_QUICHandshake.cc b/iocore/net/quic/test/test_QUICHandshake.cc
index 71ea0e6..5c2ad15 100644
--- a/iocore/net/quic/test/test_QUICHandshake.cc
+++ b/iocore/net/quic/test/test_QUICHandshake.cc
@@ -75,6 +75,7 @@ TEST_CASE("1-RTT handshake ", "[quic]")
     // ClientHello
     client->handleEvent(VC_EVENT_WRITE_READY, nullptr);
     CHECK(stream_io->transfer() > 0);
+    client->handleEvent(QUIC_EVENT_HANDSHAKE_PACKET_WRITE_COMPLETE, nullptr);
 
     // ServerHello
     server->handleEvent(VC_EVENT_READ_READY, nullptr);
@@ -82,6 +83,7 @@ TEST_CASE("1-RTT handshake ", "[quic]")
 
     client->handleEvent(VC_EVENT_READ_READY, nullptr);
     CHECK(stream_io->transfer() > 0);
+    client->handleEvent(QUIC_EVENT_HANDSHAKE_PACKET_WRITE_COMPLETE, nullptr);
 
     // Finished
     server->handleEvent(VC_EVENT_READ_READY, nullptr);

-- 
To stop receiving notification emails like this one, please contact
masaori@apache.org.

[trafficserver] 02/03: Fix tests for QUICCrypto

Posted by ma...@apache.org.
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.

[trafficserver] 01/03: Print TLS Version on debug log

Posted by ma...@apache.org.
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 d313bbaee52e2d7b26c5d8fd8906a6836744fd7a
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Jan 30 16:48:18 2018 +0900

    Print TLS Version on debug log
---
 iocore/net/QUICNetProcessor.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/iocore/net/QUICNetProcessor.cc b/iocore/net/QUICNetProcessor.cc
index 2c10942..cfb3b9e 100644
--- a/iocore/net/QUICNetProcessor.cc
+++ b/iocore/net/QUICNetProcessor.cc
@@ -58,6 +58,11 @@ QUICNetProcessor::start(int, size_t stacksize)
   // QUICInitializeLibrary();
   QUICConfig::startup();
 
+#ifdef TLS1_3_VERSION_DRAFT_TXT
+  // FIXME: remove this when TLS1_3_VERSION_DRAFT_TXT is removed
+  Debug("quic_ps", "%s", TLS1_3_VERSION_DRAFT_TXT);
+#endif
+
   // Acquire a QUICConfigParams instance *after* we start QUIC up.
   // QUICConfig::scoped_config params;
 
@@ -68,6 +73,7 @@ QUICNetProcessor::start(int, size_t stacksize)
   this->_ssl_ctx = SSL_CTX_new(TLS_method());
   SSL_CTX_set_min_proto_version(this->_ssl_ctx, TLS1_3_VERSION);
   SSL_CTX_set_max_proto_version(this->_ssl_ctx, TLS1_3_VERSION);
+
   SSL_CTX_set_alpn_select_cb(this->_ssl_ctx, QUIC::ssl_select_next_protocol, nullptr);
   SSL_CTX_add_custom_ext(this->_ssl_ctx, QUICTransportParametersHandler::TRANSPORT_PARAMETER_ID,
                          SSL_EXT_TLS_ONLY | SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS |

-- 
To stop receiving notification emails like this one, please contact
masaori@apache.org.