Android Question [SOLVED] javax.net.ssl.SSLHandshakeException

FabioRome

Member
Licensed User
Longtime User
on error:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException

or

javax.net.ssl.SSLHandshakeException:
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found

Solution:
modify: HttpUtils2Service.bas

B4X:
Sub Service_Create
    TempFolder = File.DirInternalCache

'    hc.Initialize("hc")
    hc.InitializeAcceptAll("hc")

    TaskIdToJob.Initialize
End Sub
 

FabioRome

Member
Licensed User
Longtime User
It is important to add that hc.InitializeAcceptAll means that the server certificate will not be checked.
i have a problem with certificate of "COMODO CA Limited" PositiveSSL ( TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, key 128Bit, TLS 1.2)
 
Upvote 0

fixit30

Active Member
Licensed User
Longtime User
If it is your own certificate, it is possible that the necessary Intermediate certificates are not installed correctly on your server.
 
Upvote 0
Top