Skip to content Skip to sidebar Skip to footer

How Do I Avoid Getting "no Peer Certificate" Error When Connecting To This Https Site On Android?

I am developing an Android application which needs to access QuickPay's service ('https://secure.quickpay.dk/form') through an Http-client. But I keep getting errors when accessin

Solution 1:

Just to sum up, I fixed this issue by sticking to the WebView approach. The interaction with the API was moved to a server, creating an intermediate communication point which handles the certificate issues. Not the most elegant solution but it works :)

Solution 2:

This is very mysterious. The only way an HTTPS/SSL server can avoid sending a certificate is if both sides agree to operate the SSL connection in reverse, where the server is the SSL client and the client is the SSL server, so the certificate travels in the other direction. But I can't see anything in your code that enables that mode, and it would have to be enabled at the other end too. And you would have to be providing a certificate yourself from your keystore ... Very strange.

Solution 3:

Try using UrlConnection class to make connections, and see whether you can avoid this "no peer certificate" error.

Post a Comment for "How Do I Avoid Getting "no Peer Certificate" Error When Connecting To This Https Site On Android?"