lvyanquan commented on code in PR #4156:
URL: https://github.com/apache/flink-cdc/pull/4156#discussion_r2592200629


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/debezium/DebeziumUtils.java:
##########
@@ -242,12 +243,26 @@ private static Map<String, String> querySystemVariables(
         return variables;
     }
 
+    static SSLMode sslModeFor(MySqlConnectorConfig.SecureConnectionMode mode) {
+        try {
+            return mode == null ? null : SSLMode.valueOf(mode.name());
+        } catch (IllegalArgumentException e) {
+            throw new FlinkRuntimeException(
+                    String.format("Invalid SecureConnectionMode provided: %s 
", mode.name()), e);
+        }
+    }
+
     public static BinlogOffset findBinlogOffset(
             long targetMs, MySqlConnection connection, MySqlSourceConfig 
mySqlSourceConfig) {
         MySqlConnection.MySqlConnectionConfiguration config = 
connection.connectionConfig();
         BinaryLogClient client =

Review Comment:
   We can centralize the SSL configuration in the 
DebeziumUtils#createBinaryClient method, and based on the implementation of 
MySqlStreamingChangeEventSource, we also need to set the following code:
   
https://github.com/apache/flink-cdc/blob/001cba06f58014a627931ac81fb64934d34fa191/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/io/debezium/connector/mysql/MySqlStreamingChangeEventSource.java#L224-L231
   



-- 
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]

Reply via email to