"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

SSLConnectionSocketFactory.java  (httpcomponents-client-4.5.6-src):SSLConnectionSocketFactory.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 145 skipping to change at line 145
* @since 4.3 * @since 4.3
*/ */
@Contract(threading = ThreadingBehavior.SAFE) @Contract(threading = ThreadingBehavior.SAFE)
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class SSLConnectionSocketFactory implements LayeredConnectionSocketFactor y { public class SSLConnectionSocketFactory implements LayeredConnectionSocketFactor y {
public static final String TLS = "TLS"; public static final String TLS = "TLS";
public static final String SSL = "SSL"; public static final String SSL = "SSL";
public static final String SSLV2 = "SSLv2"; public static final String SSLV2 = "SSLv2";
/**
* @deprecated Use {@link AllowAllHostnameVerifier#INSTANCE}.
*/
@Deprecated @Deprecated
public static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER public static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER
= AllowAllHostnameVerifier.INSTANCE; = AllowAllHostnameVerifier.INSTANCE;
/**
* @deprecated Use {@link BrowserCompatHostnameVerifier#INSTANCE}.
*/
@Deprecated @Deprecated
public static final X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIE R public static final X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIE R
= BrowserCompatHostnameVerifier.INSTANCE; = BrowserCompatHostnameVerifier.INSTANCE;
/**
* @deprecated Use {@link StrictHostnameVerifier#INSTANCE}.
*/
@Deprecated @Deprecated
public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER
= StrictHostnameVerifier.INSTANCE; = StrictHostnameVerifier.INSTANCE;
private final Log log = LogFactory.getLog(getClass()); private final Log log = LogFactory.getLog(getClass());
/** /**
* @since 4.4 * @since 4.4
*/ */
public static HostnameVerifier getDefaultHostnameVerifier() { public static HostnameVerifier getDefaultHostnameVerifier() {
skipping to change at line 354 skipping to change at line 363
} }
throw ex; throw ex;
} }
// Setup SSL layering if necessary // Setup SSL layering if necessary
if (sock instanceof SSLSocket) { if (sock instanceof SSLSocket) {
final SSLSocket sslsock = (SSLSocket) sock; final SSLSocket sslsock = (SSLSocket) sock;
this.log.debug("Starting handshake"); this.log.debug("Starting handshake");
sslsock.startHandshake(); sslsock.startHandshake();
verifyHostname(sslsock, host.getHostName()); verifyHostname(sslsock, host.getHostName());
return sock; return sock;
} else {
return createLayeredSocket(sock, host.getHostName(), remoteAddress.g
etPort(), context);
} }
return createLayeredSocket(sock, host.getHostName(), remoteAddress.getPo rt(), context);
} }
@Override @Override
public Socket createLayeredSocket( public Socket createLayeredSocket(
final Socket socket, final Socket socket,
final String target, final String target,
final int port, final int port,
final HttpContext context) throws IOException { final HttpContext context) throws IOException {
final SSLSocket sslsock = (SSLSocket) this.socketfactory.createSocket( final SSLSocket sslsock = (SSLSocket) this.socketfactory.createSocket(
socket, socket,
 End of changes. 5 change blocks. 
3 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)