Use SSLEngine.setApplicationProtocols() and SSLSocket.getApplicationProtocol() for Android Q
See original GitHub issueokhttp use some reflection to config the network, such as ALPN, when run in android P, system will logcat the warning in the logcat.
see https://developer.android.com/preview/restrictions-non-sdk-interfaces.html for Android P behavior change
Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection)
Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection)
Accessing hidden method Lcom/android/org/conscrypt/TrustManagerImpl;-><init>(Ljava/security/KeyStore;)V (light greylist, reflection)
Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, reflection)
Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, reflection)
Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)
We look through okhttp source, and found the reflection are all in AndroidPlatform.java
.
okhttp has some solution or workaround not to reflet system non-open api?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:35
- Comments:41 (8 by maintainers)
Top Results From Across the Web
Use SSLEngine.setApplicationProtocols() and SSLSocket ...
Use SSLEngine.setApplicationProtocols() and SSLSocket.getApplicationProtocol() for Android Q.
Read more >SSLEngine - Android Developers
The SSLEngine produces/consumes complete SSL/TLS packets only, and does not store application data internally between calls to wrap()/unwrap() .
Read more >8 Java Secure Socket Extension (JSSE) Reference Guide
Your application can initiate a new handshake by using one of the following methods: SSLSocket.startHandshake(); SSLEngine.beginHandshake().
Read more >Why SSLSocket support TLSv1.2 from API level 16+ but ...
I just want to understand the difference between SSLSocket and SSLEngine classes? I can see in android document TLSv1.2 available for ...
Read more >Android 10 API changes - Di's blog
With the latest Enhance update to support Android 10 I decided to extract API ... android/app/ActionBar$Tab - INVALID_POSITION - <init>()V ...
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
I found out that my issue with
errors was just a coincidence, right when I started testing my api endpoint Russian government decided to block my domain’s CloudFlare proxy for no apparent reason.
am getting the same issue while using ‘com.squareup.retrofit2:retrofit:2.9.0’