Repository navigation
Conversation
Signed-off-by: jpantonow <jpantonow@gmail.com>
|
Thanks for your PR @jpantonow, I took a look at the change and on Android, So this change doesn't alter runtime behaviour; it only satisfies the CrySL |
|
Thanks for checking this, and for the Conscrypt link. You're right: on Android "SSL" is an alias of "TLS", so this change doesn't alter what gets negotiated. The only effect is that the code then states the protocol it actually uses, which keeps checkers like RVSec quiet and avoids confusion for readers. If you'd rather not take a change that is only cosmetic, feel free to close it. No problem at all. |
Summary
I found that
createRegularNodeOkHttpClientcreated its SSL context with theSSLselector while retaining its existing trust manager, socket factory, hostname verifier, and timeouts.SSLis not an accepted selector here; the allowed values areTLS,TLSv1.2, orTLSv1.3.I changed the selector to
TLS. This preserves protocol negotiation, including TLS 1.3, while leaving the trust manager, socket factory, hostname verifier, timeouts, and public factory name unchanged.I found this while running the app under RVSec, a runtime-verification tool that watches the app's calls to the Java cryptography and TLS APIs and checks each sequence of calls against usage rules written in CrySL.
SSLContextSpecis the rule this code did not satisfy.How was this tested?
:app:compileFdroidDebugSources); the full multi-module build was not completed in this environmentI'm an undergraduate Computer Engineering student at the University of Brasília (UnB); this contribution is part of a research project on the analysis of Android apps, and I'm happy to adjust it to match the project's conventions.