org.apache.http.nio.conn.ssl
Class SSLIOSessionStrategy

java.lang.Object
  extended by org.apache.http.nio.conn.ssl.SSLIOSessionStrategy
All Implemented Interfaces:
SchemeIOSessionStrategy

public class SSLIOSessionStrategy
extends Object
implements SchemeIOSessionStrategy

TLS/SSL transport level security strategy.

Since:
4.0

Field Summary
static org.apache.http.conn.ssl.X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER
          Deprecated. Do not use.
static org.apache.http.conn.ssl.X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER
          Deprecated. Do not use.
static org.apache.http.conn.ssl.X509HostnameVerifier STRICT_HOSTNAME_VERIFIER
          Deprecated. Do not use.
 
Constructor Summary
SSLIOSessionStrategy(SSLContext sslcontext)
           
SSLIOSessionStrategy(SSLContext sslcontext, HostnameVerifier hostnameVerifier)
           
SSLIOSessionStrategy(SSLContext sslContext, String[] supportedProtocols, String[] supportedCipherSuites, HostnameVerifier hostnameVerifier)
           
SSLIOSessionStrategy(SSLContext sslContext, String[] supportedProtocols, String[] supportedCipherSuites, org.apache.http.conn.ssl.X509HostnameVerifier hostnameVerifier)
          Deprecated. (4.1) use SSLIOSessionStrategy( javax.net.ssl.SSLContext, String[], String[], javax.net.ssl.HostnameVerifier)
SSLIOSessionStrategy(SSLContext sslcontext, org.apache.http.conn.ssl.X509HostnameVerifier hostnameVerifier)
          Deprecated. (4.1)
 
Method Summary
static HostnameVerifier getDefaultHostnameVerifier()
           
static SSLIOSessionStrategy getDefaultStrategy()
           
static SSLIOSessionStrategy getSystemDefaultStrategy()
           
protected  void initializeEngine(SSLEngine engine)
           
 boolean isLayeringRequired()
          Determines whether or not protocol layering is required.
 org.apache.http.nio.reactor.ssl.SSLIOSession upgrade(org.apache.http.HttpHost host, org.apache.http.nio.reactor.IOSession ioSession)
          Decorates the original IOSession with a transport level security protocol implementation.
protected  void verifySession(org.apache.http.HttpHost host, org.apache.http.nio.reactor.IOSession ioSession, SSLSession sslsession)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW_ALL_HOSTNAME_VERIFIER

@Deprecated
public static final org.apache.http.conn.ssl.X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER
Deprecated. Do not use.

BROWSER_COMPATIBLE_HOSTNAME_VERIFIER

@Deprecated
public static final org.apache.http.conn.ssl.X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER
Deprecated. Do not use.

STRICT_HOSTNAME_VERIFIER

@Deprecated
public static final org.apache.http.conn.ssl.X509HostnameVerifier STRICT_HOSTNAME_VERIFIER
Deprecated. Do not use.
Constructor Detail

SSLIOSessionStrategy

@Deprecated
public SSLIOSessionStrategy(SSLContext sslContext,
                                       String[] supportedProtocols,
                                       String[] supportedCipherSuites,
                                       org.apache.http.conn.ssl.X509HostnameVerifier hostnameVerifier)
Deprecated. (4.1) use SSLIOSessionStrategy( javax.net.ssl.SSLContext, String[], String[], javax.net.ssl.HostnameVerifier)


SSLIOSessionStrategy

@Deprecated
public SSLIOSessionStrategy(SSLContext sslcontext,
                                       org.apache.http.conn.ssl.X509HostnameVerifier hostnameVerifier)
Deprecated. (4.1)


SSLIOSessionStrategy

public SSLIOSessionStrategy(SSLContext sslContext,
                            String[] supportedProtocols,
                            String[] supportedCipherSuites,
                            HostnameVerifier hostnameVerifier)
Since:
4.1

SSLIOSessionStrategy

public SSLIOSessionStrategy(SSLContext sslcontext,
                            HostnameVerifier hostnameVerifier)
Since:
4.1

SSLIOSessionStrategy

public SSLIOSessionStrategy(SSLContext sslcontext)
Method Detail

getDefaultHostnameVerifier

public static HostnameVerifier getDefaultHostnameVerifier()
Since:
4.1

getDefaultStrategy

public static SSLIOSessionStrategy getDefaultStrategy()

getSystemDefaultStrategy

public static SSLIOSessionStrategy getSystemDefaultStrategy()

upgrade

public org.apache.http.nio.reactor.ssl.SSLIOSession upgrade(org.apache.http.HttpHost host,
                                                            org.apache.http.nio.reactor.IOSession ioSession)
                                                     throws IOException
Description copied from interface: SchemeIOSessionStrategy
Decorates the original IOSession with a transport level security protocol implementation.

Specified by:
upgrade in interface SchemeIOSessionStrategy
Parameters:
host - the target host.
ioSession - the I/O session.
Returns:
upgraded I/O session.
Throws:
IOException

initializeEngine

protected void initializeEngine(SSLEngine engine)

verifySession

protected void verifySession(org.apache.http.HttpHost host,
                             org.apache.http.nio.reactor.IOSession ioSession,
                             SSLSession sslsession)
                      throws SSLException
Throws:
SSLException

isLayeringRequired

public boolean isLayeringRequired()
Description copied from interface: SchemeIOSessionStrategy
Determines whether or not protocol layering is required. If this method returns false the upgrade method is expected to have no effect and should not be called.

Specified by:
isLayeringRequired in interface SchemeIOSessionStrategy


Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.