B4J Question OkHttpUtils2 - SSL Exception

VittorioBarile

Member
Licensed User
Hello everyone,
i'm taking an error with using lib OkHttpUtils2 only on pc in my company, with another internet connection i don't get this issue.

Error:
javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
        at java.base/sun.security.ssl.SSLSocketImpl.handleEOF(Unknown Source)
        at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
        at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
        at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at b4j/okhttp3.internal.connection.RealConnection.connectTls(Unknown Source)
        at b4j/okhttp3.internal.connection.RealConnection.establishProtocol(Unknown Source)
        at b4j/okhttp3.internal.connection.RealConnection.connect(Unknown Source)
        at b4j/okhttp3.internal.connection.StreamAllocation.findConnection(Unknown Source)
        at b4j/okhttp3.internal.connection.StreamAllocation.findHealthyConnection(Unknown Source)
        at b4j/okhttp3.internal.connection.StreamAllocation.newStream(Unknown Source)
        at b4j/okhttp3.internal.connection.ConnectInterceptor.intercept(Unknown Source)
        at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
        at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
        at b4j/okhttp3.internal.cache.CacheInterceptor.intercept(Unknown Source)
        at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
        at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
        at b4j/okhttp3.internal.http.BridgeInterceptor.intercept(Unknown Source)
        at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
        at b4j/okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(Unknown Source)
        at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
        at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
        at b4j/okhttp3.RealCall.getResponseWithInterceptorChain(Unknown Source)
        at b4j/okhttp3.RealCall.execute(Unknown Source)
        at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper.executeWithTimeout(Unknown Source)
        at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper.access$0(Unknown Source)
        at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(Unknown Source)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
        at java.base/sun.security.ssl.SSLSocketInputRecord.decode(Unknown Source)
        at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source)
        ... 30 more
ResponseError. Reason: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake, Response:
javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake

How could i fix it? Somebody could help me?

Thank you in advance

P.S. i have to compile a standalone Package in .exe
 

Star-Dust

Expert
Licensed User
Longtime User
see this
 
Upvote 0

VittorioBarile

Member
Licensed User
see this
i tryed with

B4X:
#PackagerProperty: IncludedModules = jdk.charsets, javafx.web, jdk.crypto.ec

and with

B4X:
SetSystemProperty("deployment.security.TLSv1.2", "true")
    SetSystemProperty("https.protocols", "TLSv1.2")

in AppStart, but it gives the same error
 
Upvote 0
Top