You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bneradt (via GitHub)" <gi...@apache.org> on 2023/04/18 15:01:34 UTC

[GitHub] [trafficserver] bneradt commented on a diff in pull request #9347: Enables switching SSL certificates on QUIC with QUICHE

bneradt commented on code in PR #9347:
URL: https://github.com/apache/trafficserver/pull/9347#discussion_r1170165436


##########
iocore/net/QUICNetVConnection_quiche.cc:
##########
@@ -632,14 +665,83 @@ QUICNetVConnection::protocol_contains(std::string_view tag) const
   return "";
 }
 
+const char *
+QUICNetVConnection::get_server_name() const
+{
+  return get_sni_server_name();
+}
+
+bool
+QUICNetVConnection::support_sni() const
+{
+  return true;
+}
+
 SSL *
 QUICNetVConnection::_get_ssl_object() const
 {
-  return nullptr;
+  return this->_ssl;
 }
 
 ssl_curve_id
 QUICNetVConnection::_get_tls_curve() const
 {
-  return 0;
+  if (getSSLSessionCacheHit()) {
+    return getSSLCurveNID();
+  } else {
+    return SSLGetCurveNID(this->_ssl);
+  }
+}
+
+void
+QUICNetVConnection::_fire_ssl_servername_event()
+{
+}
+
+const IpEndpoint &
+QUICNetVConnection::_getLocalEndpoint()
+{
+  return this->local_addr;
+}
+
+bool
+QUICNetVConnection::_isTryingRenegotiation() const
+{
+  // Renegotiation is not allowed on QUIC (TLS 1.3) connections.
+  // If handshake is completed when this function is called, that should be unallowed attempt of renegotiation.
+  if (this->getSSLHandShakeComplete()) {
+    return true;
+  } else {
+    return false;
+  }

Review Comment:
   Might as well simplify to:
   
   ```
   return this->getSSLHandShakeComplete();
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org