Skip to content

Commit

Permalink
Add TLSSessionResumptionSupport to QUICNetVC
Browse files Browse the repository at this point in the history
  • Loading branch information
maskit committed May 19, 2020
1 parent 221c5b5 commit 3444f41
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
11 changes: 10 additions & 1 deletion iocore/net/P_QUICNetVConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include "P_UnixNetVConnection.h"
#include "P_UnixNet.h"
#include "P_UDPNet.h"
#include "P_ALPNSupport.h"
#include "TLSSessionResumptionSupport.h"
#include "tscore/ink_apidefs.h"
#include "tscore/List.h"

Expand Down Expand Up @@ -133,7 +135,11 @@ class SSLNextProtocolSet;
* WRITE:
* Do nothing
**/
class QUICNetVConnection : public UnixNetVConnection, public QUICConnection, public RefCountObj, public ALPNSupport
class QUICNetVConnection : public UnixNetVConnection,
public QUICConnection,
public RefCountObj,
public ALPNSupport,
public TLSSessionResumptionSupport
{
using super = UnixNetVConnection; ///< Parent type.

Expand Down Expand Up @@ -211,6 +217,9 @@ class QUICNetVConnection : public UnixNetVConnection, public QUICConnection, pub
LINK(QUICNetVConnection, closed_link);
SLINK(QUICNetVConnection, closed_alink);

protected:
const IpEndpoint &_getLocalEndpoint() override;

private:
std::random_device _rnd;

Expand Down
7 changes: 7 additions & 0 deletions iocore/net/QUICNetVConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2218,6 +2218,7 @@ QUICNetVConnection::_setup_handshake_protocol(shared_SSL_CTX ctx)
QUICTLS *tls = new QUICTLS(this->_pp_key_info, ctx.get(), this->direction(), this->options,
this->_quic_config->client_session_file(), this->_quic_config->client_keylog_file());
SSL_set_ex_data(tls->ssl_handle(), QUIC::ssl_quic_qc_index, static_cast<QUICConnection *>(this));
TLSSessionResumptionSupport::bind(tls->ssl_handle(), this);

return tls;
}
Expand Down Expand Up @@ -2328,3 +2329,9 @@ QUICNetVConnection::_handle_periodic_ack_event()
this->_schedule_packet_write_ready();
}
}

const IpEndpoint &
QUICNetVConnection::_getLocalEndpoint()
{
return local_addr;
}

0 comments on commit 3444f41

Please sign in to comment.