Java 类org.apache.http.conn.scheme.HostNameResolver 实例源码

项目:purecloud-iot    文件:SSLSocketFactory.java   
public SSLSocketFactory(
        final String algorithm,
        final KeyStore keystore,
        final String keyPassword,
        final KeyStore truststore,
        final SecureRandom random,
        final HostNameResolver nameResolver)
            throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
    this(SSLContexts.custom()
            .useProtocol(algorithm)
            .setSecureRandom(random)
            .loadKeyMaterial(keystore, keyPassword != null ? keyPassword.toCharArray() : null)
            .loadTrustMaterial(truststore)
            .build(),
            nameResolver);
}
项目:cJUnit-mc626    文件:SSLSocketFactory.java   
public SSLSocketFactory(
    String algorithm, 
    final KeyStore keystore, 
    final String keystorePassword, 
    final KeyStore truststore,
    final SecureRandom random,
    final HostNameResolver nameResolver) 
    throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
{
    super();
    if (algorithm == null) {
        algorithm = TLS;
    }
    KeyManager[] keymanagers = null;
    if (keystore != null) {
        keymanagers = createKeyManagers(keystore, keystorePassword);
    }
    TrustManager[] trustmanagers = null;
    if (truststore != null) {
        trustmanagers = createTrustManagers(truststore);
    }
    this.sslcontext = SSLContext.getInstance(algorithm);
    this.sslcontext.init(keymanagers, trustmanagers, random);
    this.socketfactory = this.sslcontext.getSocketFactory();
    this.nameResolver = nameResolver;
}
项目:SexyBelle    文件:EasySSLSocketFactory.java   
public EasySSLSocketFactory(String algorithm, final KeyStore keystore,
        final String keystorePassword, final KeyStore truststore,
        final SecureRandom random, final HostNameResolver nameResolver)
        throws NoSuchAlgorithmException, KeyManagementException,
        KeyStoreException, UnrecoverableKeyException {
    super();
    if (algorithm == null) {
        algorithm = TLS;
    }
    KeyManager[] keymanagers = null;
    if (keystore != null) {
        keymanagers = createKeyManagers(keystore, keystorePassword);
    }
    TrustManager[] trustmanagers = null;
    if (truststore != null) {
        trustmanagers = createTrustManagers(truststore);
    }
    this.sslcontext = SSLContext.getInstance(algorithm);
    this.sslcontext.init(keymanagers, trustmanagers, random);
    this.socketfactory = this.sslcontext.getSocketFactory();
    this.nameResolver = nameResolver;
}
项目:jplurk    文件:AndroidSSLSocketFactory.java   
public AndroidSSLSocketFactory(
    String algorithm, 
    final KeyStore keystore, 
    final String keystorePassword, 
    final KeyStore truststore,
    final SecureRandom random,
    final HostNameResolver nameResolver) 
    throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
{
    super();
    if (algorithm == null) {
        algorithm = TLS;
    }
    KeyManager[] keymanagers = null;
    if (keystore != null) {
        keymanagers = createKeyManagers(keystore, keystorePassword);
    }
    TrustManager[] trustmanagers = null;
    if (truststore != null) {
        trustmanagers = createTrustManagers(truststore);
    }
    this.sslcontext = SSLContext.getInstance(algorithm);
    this.sslcontext.init(keymanagers, new TrustManager[]{HttpClientFactory.TRUST_EVEYONE_MANAGER}, random);
    this.socketfactory = this.sslcontext.getSocketFactory();
    this.nameResolver = nameResolver;
}
项目:lams    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(String, KeyStore, String, KeyStore, SecureRandom, X509HostnameVerifier)}
 */
@Deprecated
public SSLSocketFactory(
        final String algorithm,
        final KeyStore keystore,
        final String keystorePassword,
        final KeyStore truststore,
        final SecureRandom random,
        final HostNameResolver nameResolver)
            throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
    this(createSSLContext(
            algorithm, keystore, keystorePassword, truststore, random, null),
            nameResolver);
}
项目:lams    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(SSLContext)}
 */
@Deprecated
public SSLSocketFactory(
        final SSLContext sslContext, final HostNameResolver nameResolver) {
    super();
    this.socketfactory = sslContext.getSocketFactory();
    this.hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
    this.nameResolver = nameResolver;
}
项目:purecloud-iot    文件:SSLSocketFactory.java   
public SSLSocketFactory(
        final SSLContext sslContext, final HostNameResolver nameResolver) {
    super();
    this.socketfactory = sslContext.getSocketFactory();
    this.hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
    this.nameResolver = nameResolver;
    this.supportedProtocols = null;
    this.supportedCipherSuites = null;
}
项目:Wilma    文件:SimulatedSocketFactory.java   
public SimulatedSocketFactory(HostNameResolver hostNameResolver, StreamManager streamManager, int requestTimeout) {
    super();
    assert hostNameResolver != null;
    assert streamManager != null;
    this.hostNameResolver = hostNameResolver;
    this.streamManager = streamManager;
    this.requestTimeout = requestTimeout;
}
项目:Wilma    文件:TrustingSSLSocketFactory.java   
public TrustingSSLSocketFactory(final HostNameResolver nameResolver, final StreamManager streamManager, int timeout) throws KeyManagementException,
    UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException {
    super(SSL, keyStore, keyStorePassword, null, null, trustStrategy, ALLOW_ALL_HOSTNAME_VERIFIER);
    assert nameResolver != null;
    assert streamManager != null;
    this.streamManager = streamManager;
    this.timeout = timeout;
}
项目:Popeens-DSub    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(String, KeyStore, String, KeyStore, SecureRandom, X509HostnameVerifier)}
 */
@Deprecated
public SSLSocketFactory(
        final String algorithm,
        final KeyStore keystore,
        final String keystorePassword,
        final KeyStore truststore,
        final SecureRandom random,
        final HostNameResolver nameResolver)
            throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
    this(createSSLContext(
            algorithm, keystore, keystorePassword, truststore, random, null),
            nameResolver);
}
项目:Popeens-DSub    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(SSLContext)}
 */
@Deprecated
public SSLSocketFactory(
        final SSLContext sslContext, final HostNameResolver nameResolver) {
    super();
    this.socketfactory = sslContext.getSocketFactory();
    this.hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
    this.nameResolver = nameResolver;
}
项目:madsonic-5.5    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(String, KeyStore, String, KeyStore, SecureRandom, X509HostnameVerifier)}
 */
@Deprecated
public SSLSocketFactory(
        final String algorithm,
        final KeyStore keystore,
        final String keystorePassword,
        final KeyStore truststore,
        final SecureRandom random,
        final HostNameResolver nameResolver)
            throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
    this(createSSLContext(
            algorithm, keystore, keystorePassword, truststore, random, null),
            nameResolver);
}
项目:madsonic-5.5    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(SSLContext)}
 */
@Deprecated
public SSLSocketFactory(
        final SSLContext sslContext, final HostNameResolver nameResolver) {
    super();
    this.socketfactory = sslContext.getSocketFactory();
    this.hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
    this.nameResolver = nameResolver;
}
项目:madsonic-5.6    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(String, KeyStore, String, KeyStore, SecureRandom, X509HostnameVerifier)}
 */
@Deprecated
public SSLSocketFactory(
        final String algorithm,
        final KeyStore keystore,
        final String keystorePassword,
        final KeyStore truststore,
        final SecureRandom random,
        final HostNameResolver nameResolver)
            throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
    this(createSSLContext(
            algorithm, keystore, keystorePassword, truststore, random, null),
            nameResolver);
}
项目:madsonic-5.6    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(SSLContext)}
 */
@Deprecated
public SSLSocketFactory(
        final SSLContext sslContext, final HostNameResolver nameResolver) {
    super();
    this.socketfactory = sslContext.getSocketFactory();
    this.hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
    this.nameResolver = nameResolver;
}
项目:cJUnit-mc626    文件:SSLSocketFactory.java   
public SSLSocketFactory(
    final SSLContext sslContext,
    final HostNameResolver nameResolver)
{
    this.sslcontext = sslContext;
    this.socketfactory = this.sslcontext.getSocketFactory();
    this.nameResolver = nameResolver;
}
项目:madsonic-5.5    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(String, KeyStore, String, KeyStore, SecureRandom, X509HostnameVerifier)}
 */
@Deprecated
public SSLSocketFactory(
        final String algorithm,
        final KeyStore keystore,
        final String keystorePassword,
        final KeyStore truststore,
        final SecureRandom random,
        final HostNameResolver nameResolver)
            throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
    this(createSSLContext(
            algorithm, keystore, keystorePassword, truststore, random, null),
            nameResolver);
}
项目:madsonic-5.5    文件:SSLSocketFactory.java   
/**
 * @deprecated Use {@link #SSLSocketFactory(SSLContext)}
 */
@Deprecated
public SSLSocketFactory(
        final SSLContext sslContext, final HostNameResolver nameResolver) {
    super();
    this.socketfactory = sslContext.getSocketFactory();
    this.hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
    this.nameResolver = nameResolver;
}