Skip to content

Commit

Permalink
[ISSUE apache#4273] NettyRemotingClient get tls conf from system prop…
Browse files Browse the repository at this point in the history
…erties
  • Loading branch information
zhanxuefeng authored and zhanxuefeng committed Jun 9, 2022
1 parent 446b76b commit 4a0f258
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public Thread newThread(Runnable r) {
}
});

if (nettyClientConfig.isUseTLS()) {
if (nettyClientConfig.isUseTLS() || TlsSystemConfig.tlsEnable) {
try {
sslContext = TlsHelper.buildSslContext(true);
log.info("SSL enabled for client");
Expand Down Expand Up @@ -170,7 +170,7 @@ public Thread newThread(Runnable r) {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
if (nettyClientConfig.isUseTLS()) {
if (nettyClientConfig.isUseTLS() || TlsSystemConfig.tlsEnable) {
if (null != sslContext) {
pipeline.addFirst(defaultEventExecutorGroup, "sslHandler", sslContext.newHandler(ch.alloc()));
log.info("Prepend SSL handler");
Expand Down

0 comments on commit 4a0f258

Please sign in to comment.