question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Workaround to use Netty 4.1 with TLS on Android

See original GitHub issue

We need to run a gRPC server on Android so we’re planning to use Netty for that. Everything seems to work, but we had to change the following:

https://github.com/netty/netty/blob/2b14775446f3f3937ddd6eb6bd7b22686810908f/handler/src/main/java/io/netty/handler/ssl/Conscrypt.java#L59

Because PlatformDependent.javaVersion() >= 8 won’t be true on Android.

Like I’ve said, things seem to work based on the testing we’ve done so far, but I wanted to check a couple of things:

  • Why PlatformDependent.javaVersion() >= 8? What could break if it’s 6? That way we can check those things on Android.
  • Would you be open to a PR that changed that expression with something that worked on Android? Like CAN_INSTANCE_PROVIDER && IS_CONSCRYPT_SSLENGINE != null && (PlatformDependent.isAndroid() || PlatformDependent.javaVersion() >= 8)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
ykogancommented, Feb 2, 2021

Could you share the code for your Netty-based server on Android? Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication
TLS on Android. On Android we recommend the use of the Play Services Dynamic Security Provider to ensure your application has an up-to-date...
Read more >
Forked Tomcat Native - Netty.docs
For Gradle, the solution is to explicitly declare the tcnative dependencies with classifiers. For Bazel, the solution is to use a Bazel version...
Read more >
Improper Certificate Validation vulnerability in netty-all-4.1.63 ...
Host verification in Netty is disabled by default. This can lead to MITM attack in which an attacker can forge valid SSL/TLS certificates...
Read more >
How to configure HiveMQ client serverHost, serverPort ...
It was very simple to create the HiveMQ client on Android to ... created at mosquito.org work to make a TLS connection using...
Read more >
Working with TLS 1.2 on Android 4.4 and Lower - Ankush Gupta
The solution is to use ProviderInstaller from Google Play Services to try to update the device to support the latest and greatest security ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found