/** * Secure connection if necessary. * <p/> * Provided implementation sets {@link HostnameVerifier} and {@link SSLSocketFactory} to give connection, if that * is an instance of {@link HttpsURLConnection}. * * @param client client associated with this client runtime. * @param uc http connection to be secured. */ protected void secureConnection(final JerseyClient client, final HttpURLConnection uc) { if (uc instanceof HttpsURLConnection) { HttpsURLConnection suc = (HttpsURLConnection) uc; final HostnameVerifier verifier = client.getHostnameVerifier(); if (verifier != null) { suc.setHostnameVerifier(verifier); } if (HttpsURLConnection.getDefaultSSLSocketFactory() == suc.getSSLSocketFactory()) { // indicates that the custom socket factory was not set suc.setSSLSocketFactory(sslSocketFactory.get()); } } }
/** * Secure connection if necessary. * <p/> * Provided implementation sets {@link HostnameVerifier} and {@link SSLSocketFactory} to give connection, if that * is an instance of {@link HttpsURLConnection}. * * @param client client associated with this client runtime. * @param uc http connection to be secured. */ protected void secureConnection(final JerseyClient client, final HttpURLConnection uc) { if (uc instanceof HttpsURLConnection) { HttpsURLConnection suc = (HttpsURLConnection) uc; final HostnameVerifier verifier = client.getHostnameVerifier(); if (verifier != null) { suc.setHostnameVerifier(verifier); } if (HttpsURLConnection.getDefaultSSLSocketFactory() == suc.getSSLSocketFactory()) { // indicates that the custom socket factory was not set suc.setSSLSocketFactory(sslSocketFactory.get()); } } }
/** * Secure connection if necessary. * <p/> * Provided implementation sets {@link HostnameVerifier} and {@link SSLSocketFactory} to give connection, if that * is an instance of {@link HttpsURLConnection}. * * @param client client associated with this client runtime. * @param uc http connection to be secured. */ protected void secureConnection(final JerseyClient client, final HttpURLConnection uc) { if (uc instanceof HttpsURLConnection) { HttpsURLConnection suc = (HttpsURLConnection) uc; final HostnameVerifier verifier = client.getHostnameVerifier(); if (verifier != null) { suc.setHostnameVerifier(verifier); } if (HttpsURLConnection.getDefaultSSLSocketFactory() == suc.getSSLSocketFactory()) { // indicates that the custom socket factory was not set suc.setSSLSocketFactory(sslSocketFactory.get()); } } }
/** * Secure connection if necessary. * <p/> * Provided implementation sets {@link HostnameVerifier} and {@link SSLSocketFactory} to give connection, if that * is an instance of {@link HttpsURLConnection}. * * @param client client associated with this client runtime. * @param uc http connection to be secured. */ protected void secureConnection(final JerseyClient client, final HttpURLConnection uc) { if (uc instanceof HttpsURLConnection) { HttpsURLConnection suc = (HttpsURLConnection) uc; final HostnameVerifier verifier = client.getHostnameVerifier(); if (verifier != null) { suc.setHostnameVerifier(verifier); } if (HttpsURLConnection.getDefaultSSLSocketFactory() == suc.getSSLSocketFactory()) { // indicates that the custom socket factory was not set suc.setSSLSocketFactory(sslSocketFactory.get()); } } }
/** * Secure connection if necessary. * <p/> * Provided implementation sets {@link HostnameVerifier} and {@link SSLSocketFactory} to give connection, if that * is an instance of {@link HttpsURLConnection}. * * @param client client associated with this client runtime. * @param uc http connection to be secured. */ protected void secureConnection(final JerseyClient client, final HttpURLConnection uc) { if (uc instanceof HttpsURLConnection) { HttpsURLConnection suc = (HttpsURLConnection) uc; final HostnameVerifier verifier = client.getHostnameVerifier(); if (verifier != null) { suc.setHostnameVerifier(verifier); } if (HttpsURLConnection.getDefaultSSLSocketFactory() == suc.getSSLSocketFactory()) { // indicates that the custom socket factory was not set suc.setSSLSocketFactory(sslSocketFactory.get()); } } }
/** * Secure connection if necessary. * <p/> * Provided implementation sets {@link HostnameVerifier} and {@link SSLSocketFactory} to give connection, if that * is an instance of {@link HttpsURLConnection}. * * @param client client associated with this client runtime. * @param uc http connection to be secured. */ protected void secureConnection(final JerseyClient client, final HttpURLConnection uc) { if (uc instanceof HttpsURLConnection) { HttpsURLConnection suc = (HttpsURLConnection) uc; final HostnameVerifier verifier = client.getHostnameVerifier(); if (verifier != null) { suc.setHostnameVerifier(verifier); } if (HttpsURLConnection.getDefaultSSLSocketFactory() == suc.getSSLSocketFactory()) { // indicates that the custom socket factory was not set suc.setSSLSocketFactory(sslSocketFactory.get()); } } }
/** * Secure connection if necessary. * <p/> * Provided implementation sets {@link HostnameVerifier} and {@link SSLSocketFactory} to give connection, if that * is an instance of {@link HttpsURLConnection}. * * @param client client associated with this client runtime. * @param uc http connection to be secured. */ protected void secureConnection(final JerseyClient client, final HttpURLConnection uc) { if (uc instanceof HttpsURLConnection) { HttpsURLConnection suc = (HttpsURLConnection) uc; final HostnameVerifier verifier = client.getHostnameVerifier(); if (verifier != null) { suc.setHostnameVerifier(verifier); } if (HttpsURLConnection.getDefaultSSLSocketFactory() == suc.getSSLSocketFactory()) { // indicates that the custom socket factory was not set suc.setSSLSocketFactory(sslSocketFactory.get()); } } }