public class I2PSSLSocketFactory
extends java.lang.Object
修飾子とタイプ | フィールド | 説明 |
---|---|---|
static java.util.List<java.lang.String> |
EXCLUDE_CIPHERS |
We exclude everything that Java 8 disables by default, plus some others.
|
static java.util.List<java.lang.String> |
EXCLUDE_PROTOCOLS |
Unmodifiable.
|
static java.util.List<java.lang.String> |
INCLUDE_CIPHERS |
Nothing for now.
|
static java.util.List<java.lang.String> |
INCLUDE_PROTOCOLS |
Java 7 does not enable 1.1 or 1.2 by default on the client side.
|
コンストラクタ | 説明 |
---|---|
I2PSSLSocketFactory(I2PAppContext context,
boolean loadSystemCerts,
java.lang.String relativeCertPath) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
java.net.Socket |
createSocket(java.lang.String host,
int port) |
Returns a socket to the host.
|
java.net.Socket |
createSocket(java.net.InetAddress host,
int port) |
Returns a socket to the host.
|
static void |
setProtocolsAndCiphers(javax.net.ssl.SSLServerSocket socket) |
Select protocols and cipher suites to be used
based on configured inclusion and exclusion lists
as well as enabled and supported protocols and cipher suites.
|
static void |
setProtocolsAndCiphers(javax.net.ssl.SSLSocket socket) |
Select protocols and cipher suites to be used
based on configured inclusion and exclusion lists
as well as enabled and supported protocols and cipher suites.
|
static void |
verifyHostname(I2PAppContext ctx,
javax.net.ssl.SSLSocket socket,
java.lang.String host) |
Validate the hostname
ref: https://developer.android.com/training/articles/security-ssl.html
ref: http://op-co.de/blog/posts/java_sslsocket_mitm/
ref: http://kevinlocke.name/bits/2012/10/03/ssl-certificate-verification-in-dispatch-and-asynchttpclient/
|
public static final java.util.List<java.lang.String> EXCLUDE_PROTOCOLS
public static final java.util.List<java.lang.String> INCLUDE_PROTOCOLS
public static final java.util.List<java.lang.String> EXCLUDE_CIPHERS
public static final java.util.List<java.lang.String> INCLUDE_CIPHERS
public I2PSSLSocketFactory(I2PAppContext context, boolean loadSystemCerts, java.lang.String relativeCertPath) throws java.security.GeneralSecurityException
relativeCertPath
- e.g. "certificates/i2cp"java.security.GeneralSecurityException
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException
java.io.IOException
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException
java.io.IOException
public static void verifyHostname(I2PAppContext ctx, javax.net.ssl.SSLSocket socket, java.lang.String host) throws javax.net.ssl.SSLException
javax.net.ssl.SSLException
- on hostname verification failurepublic static void setProtocolsAndCiphers(javax.net.ssl.SSLSocket socket)
public static void setProtocolsAndCiphers(javax.net.ssl.SSLServerSocket socket)