-
Notifications
You must be signed in to change notification settings - Fork 4k
Example Configuring Conscrypting on non Android #5737
Copy link
Copy link
Closed
Description
What version of gRPC are you using?
1.20.0
What did you expect to see?
Some example where conscrypting is put to use. Other parts of documentation like are good compared to this. I am using example-tls as base but I not pretty sure where the line Security.insertProviderAt(Conscrypt.newProvider(), 1); goes and if there is anyother changes that are needed.
EDIT:
public static void main(String[] args) throws IOException, InterruptedException {
if (args.length < 4 || args.length > 5) {
System.out.println(
"USAGE: HelloWorldServerTls host port certChainFilePath privateKeyFilePath " +
"[trustCertCollectionFilePath]\n Note: You only need to supply trustCertCollectionFilePath if you want " +
"to enable Mutual TLS.");
System.exit(0);
}
final HelloWorldServerTls server = new HelloWorldServerTls(args[0],
Integer.parseInt(args[1]),
args[2],
args[3],
args.length == 5 ? args[4] : null);
Security.insertProviderAt(Conscrypt.newProvider(), 1);
server.start();
server.blockUntilShutdown();
}
Is this enough if I add that Security.insertProviderAt(Conscrypt.newProvider(), 1); over there and just add the conscrypt gradle dependency? Is there something else I need to do?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels