Skip to content

Commit

Permalink
Add new option to force SSL communication between master and slave
Browse files Browse the repository at this point in the history
  • Loading branch information
zhicwu committed Aug 28, 2016
1 parent 58be3c2 commit b329da9
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public class SlaveServer extends ChangedFlag implements Cloneable, SharedObjectI

public static final int KETTLE_CARTE_RETRY_BACKOFF_INCREMENTS = getBackoffIncrements();

public static final boolean KETTLE_FORCED_SSL = getForcedSsl();

private static int getNumberOfSlaveServerRetries() {
try {
return Integer.parseInt(Const.NVL(System.getProperty("KETTLE_CARTE_RETRIES"), "0"));
Expand All @@ -94,6 +96,18 @@ public static int getBackoffIncrements() {
}
}

public static boolean getForcedSsl()
{
try
{
return "Y".equalsIgnoreCase(System.getProperty("KETTLE_FORCED_SSL"));
}
catch(Exception e)
{
return false;
}
}

private LogChannelInterface log;

private String name;
Expand Down Expand Up @@ -1104,7 +1118,7 @@ public void setSslMode(boolean sslMode) {
* @return the sslMode
*/
public boolean isSslMode() {
return sslMode;
return KETTLE_FORCED_SSL || sslMode;
}

/**
Expand Down

0 comments on commit b329da9

Please sign in to comment.