I want to make tls/ssl connection between client and server(Not mutual, one way).
This is my setup:
Server server = ServerBuilder.forPort(8443) // Enable TLS .useTransportSecurity(certChainFile, privateKeyFile) .addService(new GreetingServiceImpl()) .build();
// With server authentication SSL/TLS ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 8443) .build(); GreetingServiceGrpc.GreetingServiceBlockingStub stub = GreetingServiceGrpc.newBlockingStub(channel);
All I need is Terminal commands to generate certChainFile and privateKeyFile(in .pem) to pass these file to server code as shown above.