iOS Question (Solved) ResponseError: An SSL error has occurred and a secure connection to the server cannot be made., status code: 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi, I have this error ResponseError: An SSL error has occurred and a secure connection to the server cannot be made., status code: 0 when I'm using HTTPJob

B4X:
ResponseError: An SSL error has occurred and a secure connection to the server cannot be made., status code: 0

I just installed a new SSL certificate on my website and this error has started. The website itself works fine.

In my Main I have this line #ATSEnabled: True

The URL is https://portal.hcmsemr.com/frmapi.aspx

(Note that I am using iHttpUtils2 in the B4i version of my app)

This is my code

B4X:
Try
        Dim Params As String
        Dim response As String=""
        Dim jobClients As HttpJob
    

    
        Params="Ticket=" & Main.Ticket &  "&RegKey=" & Main.RegKey & "&whattodo=checkversion"
    
        jobClients.Initialize("", Me)
    
        jobClients.PostString(modFun.Url,Params)
            
        Wait For(jobClients)    JobDone(j As HttpJob)
    
        If J.Success=False Then
        
            ProgressDialogHide
        
            MsgboxAsync(modFun.NoConnection(Main.SQL1),"HCMS")
        

            Main.TestRet=True
        
        
        Else
        
            response =J.GetString
            str_response=response
            Main.TestRet=ApplyResponse(response)
        
            If IsError=True Then
                MsgboxAsync(MsgStr,"HCMS")
                Wait For msgbox_result(MsgRes As Int)
            End If
        
            Log("CheckVersionOnServer " & Main.TestRet)
        
        
        
        End If
    
        J.release
    
        CallSubDelayed(Me,"CheckVersionOnServe_Complete")
 
    Catch
        Log("CheckVersionOnServe " & LastException.Message)
        modFun.ShowError("clsCheckVersion_CheckVersionOnServe " & LastException.Message)
    
    End Try
End Sub
 

Alex_197

Well-Known Member
Licensed User
Longtime User
Hello, I have the same problem, please tell me how you solved it. Thank you so much!

It looks that we made a mistake when we submitted a csr file to the SSL store. They have a dropdown list where we need to select a type of a intermediate chain. So we selected the wrong item. It should be DigiTrust RSA CA 2018. At list this what was selected a year ago. And mobile devices and the website worked fine.

The SSL needs to be replaced with the correct one.

In tour case check what the SSL type did you have.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…