It's also quite possible the certificate chain is a bit iffy. You can check this quite easily by surfing to the URL with the *built- in browser* in your Android phone. If the certificate works there but *not* in your app (i assume you are using the Apache HttpClient?) its most often your chain that is ordered incorrectly.
The built-in browser had a fix (afaik) for badly ordered certificates, HttpClient does not. If you are using a self-signed certificate or a root certificate not in the phone you'll have to do it the hard way and add your own truststore (AuthSSLProtocolSocketFactory for instance). Uh, and Android only support BKS for the keystore I think. On 23 Maj, 04:23, DanH <[email protected]> wrote: > Assuming the server is legitimate, you basically see this problem > because the certificate presented by the HTTPS server doesn't have a > certificate chain that can be verified against one of the root > certificates on the phone. It may be possible to download and install > a new (additional) root authority certificate on the phone (I don't > know if this is possible on Android -- it isn't on some phones). If > not, or if you want a "fix" that doesn't require actions on the part > of the user, you can either tell the HTTPS protocol to not verify the > server's cert (not particularly dangerous if the trusted URL is > hardwired into your app), or you can include a suitable root cert in > your application and give that to the HTTPS protocol for its use. > (I'm not familiar with how precisely you do these things on Android.) > > On May 22, 6:58 pm, dashman <[email protected]> wrote: > > > I'm trying to connect to a server via https and am getting > > invalid server certificate. > > > how do i solve this. > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

