Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kannanjgithub committed Dec 4, 2024
1 parent 0ddd42c commit 5109115
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion examples/example-tls/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ application {
applicationDistribution.into('bin') {
from(helloWorldTlsServer)
from(helloWorldTlsClient)
fileMode = 0755
filePermissions {
unix(0755)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public static void main(String[] args) throws Exception {

if (args.length < 2 || args.length == 4 || args.length > 5) {
System.out.println("USAGE: HelloWorldClientTls host port [trustCertCollectionFilePath " +
"[clientCertChainFilePath clientPrivateKeyFilePath]]\n Note: clientCertChainFilePath and " +
"clientPrivateKeyFilePath are only needed if mutual auth is desired.");
"[clientCertChainFilePath clientPrivateKeyFilePath]]\n Note: clientCertChainFilePath and " +
"clientPrivateKeyFilePath are only needed if mutual auth is desired.");
System.exit(0);
}

Expand All @@ -88,9 +88,9 @@ public static void main(String[] args) throws Exception {
String host = args[0];
int port = Integer.parseInt(args[1]);
ManagedChannel channel = Grpc.newChannelBuilderForAddress(host, port, tlsBuilder.build())
/* Only for using provided test certs. */
.overrideAuthority("foo.test.google.fr")
.build();
/* Only for using provided test certs. */
.overrideAuthority("foo.test.google.fr")
.build();
try {
HelloWorldClientTls client = new HelloWorldClientTls(channel);
client.greet(host);
Expand Down

0 comments on commit 5109115

Please sign in to comment.