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/09/11 06:09:52 UTC

[trafficserver] branch quic-latest updated (b2a9a9b -> 18b5077)

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

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


    from b2a9a9b  Fix a compile error on test_qpack
     new 7c089c1  Update mock class for QUIC
     new 18b5077  Remove dependency for QUICTLS from QUICHandshake

The 2 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/P_QUICNetVConnection.h |  2 ++
 iocore/net/QUICNetVConnection.cc  | 16 +++++++++++++---
 iocore/net/quic/Mock.h            | 22 ++++++++++++++++++++++
 iocore/net/quic/QUICHandshake.cc  |  7 -------
 4 files changed, 37 insertions(+), 10 deletions(-)


[trafficserver] 01/02: Update mock class for QUIC

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7c089c1906827eae2b331267e48380098922456c
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Sep 11 15:08:53 2018 +0900

    Update mock class for QUIC
---
 iocore/net/quic/Mock.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/iocore/net/quic/Mock.h b/iocore/net/quic/Mock.h
index dff1afa..9c7efeb 100644
--- a/iocore/net/quic/Mock.h
+++ b/iocore/net/quic/Mock.h
@@ -615,6 +615,28 @@ public:
   {
     return;
   }
+
+  std::shared_ptr<const QUICTransportParameters>
+  local_transport_parameters() override
+  {
+    return nullptr;
+  }
+
+  std::shared_ptr<const QUICTransportParameters>
+  remote_transport_parameters() override
+  {
+    return nullptr;
+  }
+
+  void
+  set_local_transport_parameters(std::shared_ptr<const QUICTransportParameters> tp) override
+  {
+  }
+
+  void
+  set_remote_transport_parameters(std::shared_ptr<const QUICTransportParameters> tp) override
+  {
+  }
 };
 
 class MockContinuation : public Continuation


[trafficserver] 02/02: Remove dependency for QUICTLS from QUICHandshake

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 18b507739d251f3319352c9c16a5cab58d91fad7
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Sep 11 15:09:27 2018 +0900

    Remove dependency for QUICTLS from QUICHandshake
---
 iocore/net/P_QUICNetVConnection.h |  2 ++
 iocore/net/QUICNetVConnection.cc  | 16 +++++++++++++---
 iocore/net/quic/QUICHandshake.cc  |  7 -------
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/iocore/net/P_QUICNetVConnection.h b/iocore/net/P_QUICNetVConnection.h
index 2fc8c63..9b18fe8 100644
--- a/iocore/net/P_QUICNetVConnection.h
+++ b/iocore/net/P_QUICNetVConnection.h
@@ -345,6 +345,8 @@ private:
   void _rerandomize_original_cid();
   bool _is_src_addr_verified();
 
+  QUICHandshakeProtocol *_setup_handshake_protocol(SSL_CTX *ctx);
+
   QUICPacketUPtr _the_final_packet = QUICPacketFactory::create_null_packet();
   QUICStatelessResetToken _reset_token;
 
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 63a4148..55a347b 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -35,7 +35,7 @@
 #include "QUICTLS.h"
 
 #include "QUICStats.h"
-#include "QUICConfig.h"
+#include "QUICGlobals.h"
 #include "QUICDebugNames.h"
 #include "QUICEvents.h"
 #include "QUICConfig.h"
@@ -205,10 +205,10 @@ QUICNetVConnection::start()
   // Version 0x00000001 uses stream 0 for cryptographic handshake with TLS 1.3, but newer version may not
   if (this->direction() == NET_VCONNECTION_IN) {
     this->_reset_token.generate(this->_quic_connection_id, params->server_id());
-    this->_hs_protocol       = new QUICTLS(params->server_ssl_ctx(), this->direction());
+    this->_hs_protocol       = this->_setup_handshake_protocol(params->server_ssl_ctx());
     this->_handshake_handler = new QUICHandshake(this, this->_hs_protocol, this->_reset_token, params->stateless_retry());
   } else {
-    this->_hs_protocol       = new QUICTLS(params->client_ssl_ctx(), this->direction());
+    this->_hs_protocol       = this->_setup_handshake_protocol(params->client_ssl_ctx());
     this->_handshake_handler = new QUICHandshake(this, this->_hs_protocol);
     this->_handshake_handler->start(&this->_packet_factory, params->vn_exercise_enabled());
     this->_handshake_handler->do_handshake();
@@ -1879,3 +1879,13 @@ QUICNetVConnection::_is_src_addr_verified()
 {
   return this->_src_addr_verified;
 }
+
+QUICHandshakeProtocol *
+QUICNetVConnection::_setup_handshake_protocol(SSL_CTX *ctx)
+{
+  // Initialize handshake protocol specific stuff
+  // For QUICv1 TLS is the only option
+  QUICTLS *tls = new QUICTLS(ctx, this->direction());
+  SSL_set_ex_data(tls->ssl_handle(), QUIC::ssl_quic_qc_index, static_cast<QUICConnection *>(this));
+  return tls;
+}
diff --git a/iocore/net/quic/QUICHandshake.cc b/iocore/net/quic/QUICHandshake.cc
index 645ef6e..5f340ac 100644
--- a/iocore/net/quic/QUICHandshake.cc
+++ b/iocore/net/quic/QUICHandshake.cc
@@ -25,7 +25,6 @@
 
 #include <utility>
 
-#include "QUICTLS.h"
 #include "QUICEvents.h"
 #include "QUICGlobals.h"
 #include "QUICVersionNegotiator.h"
@@ -93,12 +92,6 @@ QUICHandshake::QUICHandshake(QUICConnection *qc, QUICHandshakeProtocol *hsp, QUI
     _reset_token(token),
     _stateless_retry(stateless_retry)
 {
-  // FIXME These should be done in another way
-  if (dynamic_cast<QUICTLS *>(hsp)) {
-    SSL *ssl = static_cast<QUICTLS *>(hsp)->ssl_handle();
-    SSL_set_ex_data(ssl, QUIC::ssl_quic_qc_index, qc);
-  }
-
   this->_hs_protocol->initialize_key_materials(this->_qc->original_connection_id());
 
   if (this->_qc->direction() == NET_VCONNECTION_OUT) {