|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.util.I2PSSLSocketFactory
public class I2PSSLSocketFactory
Loads trusted ASCII certs from ~/.i2p/certificates/ and $I2P/certificates/. TODO extend SSLSocketFactory
Field Summary | |
---|---|
static List<String> |
EXCLUDE_CIPHERS
We exclude everything that Java 8 disables by default, plus some others. |
static List<String> |
EXCLUDE_PROTOCOLS
Unmodifiable. |
static List<String> |
INCLUDE_CIPHERS
Nothing for now. |
static List<String> |
INCLUDE_PROTOCOLS
Java 7 does not enable 1.1 or 1.2 by default on the client side. |
Constructor Summary | |
---|---|
I2PSSLSocketFactory(I2PAppContext context,
boolean loadSystemCerts,
String relativeCertPath)
|
Method Summary | |
---|---|
Socket |
createSocket(InetAddress host,
int port)
Returns a socket to the host. |
Socket |
createSocket(String host,
int port)
Returns a socket to the host. |
static void |
setProtocolsAndCiphers(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(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,
SSLSocket socket,
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/ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final List<String> EXCLUDE_PROTOCOLS
public static final List<String> INCLUDE_PROTOCOLS
public static final List<String> EXCLUDE_CIPHERS
public static final List<String> INCLUDE_CIPHERS
Constructor Detail |
---|
public I2PSSLSocketFactory(I2PAppContext context, boolean loadSystemCerts, String relativeCertPath) throws GeneralSecurityException
relativeCertPath
- e.g. "certificates/i2cp"
GeneralSecurityException
Method Detail |
---|
public Socket createSocket(String host, int port) throws IOException
IOException
public Socket createSocket(InetAddress host, int port) throws IOException
IOException
public static void verifyHostname(I2PAppContext ctx, SSLSocket socket, String host) throws SSLException
SSLException
- on hostname verification failurepublic static void setProtocolsAndCiphers(SSLSocket socket)
public static void setProtocolsAndCiphers(SSLServerSocket socket)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |