buxingzhe commented on issue #6040:
URL: https://github.com/apache/skywalking/issues/6040#issuecomment-748816625
Suggest to make a change to file
org.apache.skywalking.apm.agent.core.remote.TLSChannelBuilder.java as below:
public class TLSChannelBuilder implements
ChannelBuilder<NettyChannelBuilder> {
private static String CA_FILE_NAME = "ca" + Constants.PATH_SEPARATOR +
"ca.crt";
@Override
public NettyChannelBuilder build(
NettyChannelBuilder managedChannelBuilder) throws
AgentPackageNotFoundException, SSLException {
File caFile = new File(AgentPackagePath.getPath(), CA_FILE_NAME);
boolean hasCAFile = caFile.exists() && caFile.isFile();
boolean shouldTlsEnabled =
"true".equalsIgnoreCase(System.getProperty("skywalking.grpc.tls.enabled",
"true"));
if (hasCAFile || shouldTlsEnabled) {
SslContextBuilder builder = GrpcSslContexts.forClient();
if (hasCAFile) {
builder.trustManager(caFile);
}
managedChannelBuilder =
managedChannelBuilder.negotiationType(NegotiationType.TLS)
.sslContext(builder.build());
}
return managedChannelBuilder;
}
}
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]