gavinchou commented on code in PR #16340:
URL: https://github.com/apache/doris/pull/16340#discussion_r1101059915


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlProto.java:
##########
@@ -170,8 +173,49 @@ public static boolean negotiate(ConnectContext context) 
throws IOException {
             LOG.debug("Send and flush channel exception, ignore.", e);
             return false;
         }
+
+        // Server receive request packet from client, we need to determine 
which request type it is.
+        ByteBuffer clientRequestPacket = channel.fetchOnePacket();
+        MysqlCapability capability = new 
MysqlCapability(MysqlProto.readLowestInt4(clientRequestPacket));
+
+        // Server receive SSL connection request packet from client.
+        ByteBuffer sslConnectionRequest;
         // Server receive authenticate packet from client.
-        ByteBuffer handshakeResponse = channel.fetchOnePacket();
+        ByteBuffer handshakeResponse;
+
+        if (capability.isSsl()) {
+            // During development, we set SSL mode to true by default
+            if (USE_SSL) {
+                sslConnectionRequest = clientRequestPacket;

Review Comment:
   ```
   mysqlChannel.isSslMode = true;
   
   boolean isSslMode() { return isSslMode; }
   ```
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to