I'm having a problems regarding HTTP connections using SSL, using a self-signed certificate.
The subject is about Android, but I believe that I can find a very good answer here (JavaRanch), although there will be some caveats of Android that I have to keep in mind.
Many articles and topics from forums and blogs, instruct about creating an SSLSocket factory, and set it on the HttpsURLConnection before making connections. But until I just have found pieces of codes (the IntellJ IDE is always complaining: cannot resolve symbol...), and nothing complete.
Does anyone have a COMPLETE EXAMPLE (no missing parts) in Java (JSSE javax.net.ssl.*), about creating a SSLSocket factory for a self-signed certificate, accepting just my certificate, and finally, being able to perform HTTPS requests to my server?
P.S.: I have exported the certificate of my server and created a truststore .BKS.