From 748bc13568050868eb3815529809074eaa63d1f5 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel Date: Sat, 5 Nov 2022 15:44:51 +0400 Subject: [PATCH] Fix ssl connections on PooledConnections useSSL in configloader wasn't passing it to the ConnectionProvider --- .../minecraft/redisbungee/api/config/ConfigLoader.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/api/config/ConfigLoader.java b/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/api/config/ConfigLoader.java index fb0fdb7..195730a 100644 --- a/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/api/config/ConfigLoader.java +++ b/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/api/config/ConfigLoader.java @@ -39,11 +39,6 @@ public interface ConfigLoader { loadConfig(plugin, dataFolder.toPath()); } - // There currently a problem with the SSL/TLS connections - // looking into the Jedis source code you can pass some form of - // Domain Validation, SSL factory from javax packages - // todo: create Domain valdiation - // todo: add new config options for ssl certs locations default void loadConfig(RedisBungeePlugin plugin, Path dataFolder) throws IOException { Path configFile = createConfigFile(dataFolder); final YAMLConfigurationLoader yamlConfigurationFileLoader = YAMLConfigurationLoader.builder().setPath(configFile).build(); @@ -126,7 +121,7 @@ public interface ConfigLoader { GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig<>(); poolConfig.setMaxTotal(maxConnections); poolConfig.setBlockWhenExhausted(true); - summoner = new JedisPooledSummoner(new PooledConnectionProvider(new ConnectionFactory(new HostAndPort(redisServer, redisPort), DefaultJedisClientConfig.builder().timeoutMillis(5000).password(redisPassword).build()), poolConfig), jedisPool); + summoner = new JedisPooledSummoner(new PooledConnectionProvider(new ConnectionFactory(new HostAndPort(redisServer, redisPort), DefaultJedisClientConfig.builder().timeoutMillis(5000).ssl(useSSL).password(redisPassword).build()), poolConfig), jedisPool); redisBungeeMode = RedisBungeeMode.SINGLE; } plugin.logInfo("Successfully connected to Redis.");