First check in of HttxURLConnection.java, which extends HttpsURLConnection, but contains the hostname and set a TrustManager each time a connection is opened, so that the hostname and cert chain is checked at the same time.