Home > Software design >  Does okhttp tls v1.2 connection comes by default?
Does okhttp tls v1.2 connection comes by default?

Time:04-06

I'm working on point of sale(pos) and i need a TLS v1.2 connection in my android app.I found a these link to get tls connection on okhttp.

link 1

link 2

these links are customize and extend sslscoketfactory for tlsscoketfactory.

my questions is these links are old and with new updates okhttp 3.1.1 standart request are supports TLS connection ?

I tried webview connection and but i want to use pos in my app without any webview or something else.

CodePudding user response:

OkHttp’s TLS configuration history tells you what TLS versions are used for what OkHttp versions.

https://square.github.io/okhttp//security/tls_configuration_history/#okhttp-313

For TLS 1.2 use the ConnectionSpec.MODERN_TLS (the default) and OkHttp 3.13 . You probably want the latest 4.x release though, OkHttp 3.x is officially unsupported since 2022-01-01.

CodePudding user response:

I'm not sure if this is what you are asking for , but official okhttp docs explicitly state from which version TLSv1 and TLSv1.1 are no longer enabled by default in favor of TLSv1.2. You can check it by yourself on following link okhttp 3.13.0

  • Related