Android Question SSL 0x7f95283a00

Semen Matusovskiy

Well-Known Member
Licensed User
Hi, guys --

We began tests (about 100 testers) and found that there are problems with SSL on 4 phones.
The responce is following
javax.net. ssl.SSLHandshakeExc eption: SSL handshake aborted: ssl=0x7f95283a00: I/O error during system call, Connection reset by peer

Can't find any information about this error. What this means ?

The web-server is under our control and exactly we set a certificate (Comodo).
www.ssllabs.com confirms that the certificate is trusted for Mozilla, Apple, Android, Java, Windows
Unf., I have indirect contacts with testers and it's hard to receive fast answer.
According my information, models of problem phones are not well-known. But Android release is at least 5. Google Place Services are installed and updated (otherwise my program will not work).

Probably, something wrong with root certificates. Maybe, if to accept all certificates, the error will disappear. But this is equal to refuse from SSL at all.

Somebody had matter with 0x7f95283a00 ?
 
Last edited:

Semen Matusovskiy

Well-Known Member
Licensed User
Erel --

I have a fragment (from your sample). But I use it for Android 4 only.
Do you offer to use Google provider for Android5+ also ?


B4X:
Sub ActivateSSL

    Dim javaobjectContext                                                       As JavaObject
    Dim javaobjectInstance                                                      As JavaObject
    Dim objectListener                                                          As Object
    Dim phoneInstance                                                           As Phone

    Try
        Select Case phoneInstance.SdkVersion
            Case 16, 17, 18, 19, 20 ' Android 4.1 - 4.4
            Case Else
                Return
        End Select
        javaobjectInstance.InitializeStatic ("com.google.android.gms.security.ProviderInstaller")
        javaobjectContext.InitializeContext
        DisableStrictMode
        objectListener = javaobjectInstance.CreateEventFromUI ("com.google.android.gms.security.ProviderInstaller.ProviderInstallListener", "objectListener", Null)
        javaobjectInstance.RunMethod ("installIfNeededAsync", Array (javaobjectContext, objectListener))
        Wait For objectListener_Event (stringMethodName As String, objectArguments () As Object)
        ' If stringMethodName = "onProviderInstalled" Then [ Provider installed successfully ] Else [ Error installing provider (objectArguments (0)) ]
    Catch
    End Try

End Sub

Sub DisableStrictMode

    Dim javaobjectInstance                                                      As JavaObject
    Dim javaobjectPolicy                                                        As JavaObject
    Dim javaobjectStrictMode                                                    As JavaObject

    Try
        javaobjectInstance.InitializeStatic ("android.os.Build.VERSION")
        If javaobjectInstance.GetField ("SDK_INT") > 9 Then
            javaobjectPolicy = javaobjectPolicy.InitializeNewInstance ("android.os.StrictMode.ThreadPolicy.Builder", Null)
            javaobjectPolicy = javaobjectPolicy.RunMethodJO ("permitAll", Null). RunMethodJO ("build", Null)
            javaobjectStrictMode.InitializeStatic ("android.os.StrictMode"). RunMethod ("setThreadPolicy", Array (javaobjectPolicy))
        End If
    Catch
    End Try

End Sub
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
Today I received results. Using Google provider for all platforms (not only for Android 4) fixed problems for all affected phones. Thanx.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…