Its new topic for me. I'm able to connect as plaintext.
public ManagedChannel getChannel(String serviceName){
TSServiceClientManager scm = TSServiceManagementFactory.getInstance().getServiceClientManager();
TSServiceConnectionInfo connInfo = scm.getServiceConnectionInfo(serviceName);
if(channel == null){
channel = ManagedChannelBuilder.forAddress(connInfo.getHost(), connInfo.getPort())
.usePlaintext(true) //need help here for SSL code
.build();
}
return channel;
}
I was told to enable client-side SSL. I know how to generate, keystore, truststore, pem, CA etc. I need help in :
How to enable SSL instead of .usePlaintext(true) as shown in above code?
(Kindly rewrite the code considering the cert file, keystore, truststore and .pem file exist)
And
I want to know is there anything to do with server to make SSL connection work?