Example Configuring Conscrypting on non Android
See original GitHub issueWhat 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?
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
Conscrypt - Android Open Source Project
The Conscrypt module accelerates security improvements and improves device security without relying on OTA updates. It uses Java code and a native library ......
Read more >Discretionary Access Control (DAC) | Android Open Source ...
On this page; Adding Android IDs (AIDs); Configuring AIDs. Configuring the caps section; Configuring the AID section. Usage examples.
Read more >Network Stack Configuration Tools
The Android operating system contains standard Linux networking utilities such as ifconfig , ip , and ip6tables . These utilities reside on ...
Read more >Configuring ART | Android Open Source Project
As an example, Pixel devices are configured with the following compilation flow: An application is initially installed without any AOT ...
Read more >Configuring audio policies | Android Open Source Project
For example, the use of all device properties not just its type in policy rules. Android 7.0 introduced a audio policy configuration file ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes. There will be some updates to the tls example to swap to different certs. You can wait for that. You can also try something like https://github.com/square/certstrap (there’s pre-built binaries available on the releases page)
I think something like this would be close.
You’d need to change the code to use .pem instead of .crt and .key instead of .pem.
Thanks! Helps a lot!! We will evaluate this further and if I have any doubts will come back.