Skip to content

Commit

Permalink
实现 alibaba#3000 Issue的功能:Redis 数据源支持 SSL
Browse files Browse the repository at this point in the history
  • Loading branch information
z521598 committed Feb 20, 2023
1 parent e848dc3 commit 2339a6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sentinel-extension/sentinel-datasource-redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<properties>
<java.source.version>1.8</java.source.version>
<java.target.version>1.8</java.target.version>
<lettuce.version>6.2.1.RELEASE</lettuce.version>
<lettuce.version>5.3.1.RELEASE</lettuce.version>
<redis.mock.version>0.1.6</redis.mock.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ private SslOptions initSslOptions(RedisConnectionConfig connectionConfig) {

if (connectionConfig.getTrustedCertificatesPath() != null){
if (connectionConfig.getTrustedCertificatesPath().endsWith(".jks")){
// if the value is end with .jks,think it is java key store format,to invoke truststore mthod
// if the value is end with .jks,think it is java key store format,to invoke truststore method
sslOptionsBuilder.truststore(
new File(connectionConfig.getTrustedCertificatesPath()),
connectionConfig.getTrustedCertificatesJksPassword()
);
} else {
// if the value is not end with .jks,think it is pem format,to invoke trustManager mthod
// if the value is not end with .jks,think it is pem format,to invoke trustManager method
sslOptionsBuilder.trustManager(new File(connectionConfig.getTrustedCertificatesPath()));
}
}
Expand Down

0 comments on commit 2339a6d

Please sign in to comment.