I’m putting together a demo web-app.
I’ve created a certificate signed by my own CA, and imported that CA into the android device.
I have the Android device going to:
10.0.2.2 (Which is the host machine on the emulator)
The host comes up, but its given a domain mismatch error in the browser, even though the certificate is 10.0.2.2.
Anybody know why?
What Android version are you testing on? Android’s hostname verifier is stricter than most browsers, and requires the IP address to be in a Subject Alternative Name entry of IP address type, not just in the CN. So either use a hostname to access your demo site, or re-create the certificate, putting the IP address in the SAN extension. If you are using OpenSSL, something like this should do it: http://andyarismendi.blogspot.in/2011/09/creating-certificates-with-sans-using.html