I believe that you are looking for what's usally called FakeSocketFactory
. This enables usage of SSL cerificates without verifying them (with CA
or other certification entity).
You may addapt the class NaiveTrustManager
in code bellow to check against your own CA certificate.
You can find a code example in Fake Socket Factory
Regards.