I use the BouncyCastle provider and Apache HttpClient provider to trust the SSL certificate as described by Antoine Hauck here .
The application I installed for Android 1.5 works fine on an emulator and a device running 3.0. However, when I try to test it on 2.2 (Galaxy S), an SSLException "Untrusted server certificate" occurs.
Since there are no errors related to BouncyCastle, I assume that the device does not correctly read the certificates from the .bks file. Is I trying to use BouncyCastle for Android version 2.2, or is it just something that needs to be changed from a working 3.0 application?
Update
When I tried to start the application again today, it worked correctly for the first time. I have tried this several times now and it sometimes works correctly, but sometimes it still gets SSLException. It seems that there is no such pattern when this happens - it can work several times in a row and then fail again.
source share