Android Question Trust anchor for certification path not found.

Status
Not open for further replies.

hatzisn

Well-Known Member
Licensed User
Longtime User
Hi everybody,

I am facing a problem with accessing a site in Android device and emulator.
I get the following error:
javax.net.ssl.SSLHandshakeException:java.security.cert.CertPathValidatorException:Trust anchor for certification path not found.

I use the OkHttp and OkHttpUtils2 libraries.

This is my code:
B4X:
Sub GetHTML()
    ProgressDialogShow("Downloading verb conjugation.")
    Dim hj As HttpJob
    hj.Initialize("MainHTML", Me)
    hj.Download("https://www.italian-verbs.com/italian-verbs/conjugation.php?parola=" & txtVerb.Text)
End Sub

I also checked the SSL certificate of the site in http://www.digicert.com/help and here is what I get:

digicert.jpg


Is the "SSL Certificate is not trusted" the reason for the error I get?
If yes is there a workaround?
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
Thanks DonManfred. It worked like a charm.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Sorry DonManfred,

I checked that earlier Erel says " The library is a b4xlib now. The source code is inside the library. Unzip it and you will see. "
Where do i find b4xlib.zip

Juzer
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
I extracted okhttputils2.b4xlib it gives HttpJob and HttpUtils2Service.
I removed Ok... libraries and added above 2 source files but it gives error at
Private req As OkHttpRequest "
HttpJob - 301: Unknown type: okhttprequest<br />Are you missing a library reference?
HttpJob - 16: Unknown type: okhttpresponse<br />Are you missing a library reference?
HttpJob - 15: Unknown type: okhttprequest<br />Are you missing a library reference?
"
I cannot have both library as well as source.
source of OKHttputils2 is needed i guess
 
Last edited:
Upvote 0
Status
Not open for further replies.
Top