Twitter4j getOAuthRequestToken returns ssl handshake exception

hello.
I use twitter4j 4.07jar and getOAuthRequestToken api in android e-ink device(4.2.2), api returns ssl handshake exception.

getOAuthRequestToken api worked well in android e-ink device before, but at some point it didn’t work. so i asked what is problem and what can i do.
i thought this issue related with tls 1.2.

if i use twitter4j, what can i do to solve this issue ?
08-21 10:49:20.173 3791-4490/com.keph.crema.shine W/System.err: SSL handshake aborted: ssl=0x6763f1e0: I/O error during system call, Connection reset by peer

What version of android does the device have?
Some older versions of android are capable of TLS 1.2, but it’s not enabled by default - maybe this will point you to a solution? https://gist.github.com/fkrauthan/ac8624466a4dee4fd02f
I know Twitter4J has a PR for making OkHTTP use TLS1.2 https://github.com/Twitter4J/Twitter4J/pull/329

i haven’t tried it so i don’t know if that fixes it

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.