We should use SSLConnectionSocketFactory instead. See JLBP-13: https://github.com/GoogleCloudPlatform/cloud-opensource-java/blob/master/library-best-practices/JLBP-13.md