public class LdapSSLSocketFactoryDelegate
extends java.lang.Object
CertificateService
.
Note that the documentation says to extend SocketFactory
, but the
LDAP directory context tries to create an unconnected socket without a
hostname first by calling createSocket. It would be impossible to
validate the hostname against the certificate, which leads to an insecure
communication. It only calls createSocket(String, int)
when
createSocket is not found
Constructor and Description |
---|
LdapSSLSocketFactoryDelegate() |
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
createSocket(java.lang.String host,
int port)
Creates a socket for the specified destination host and port.
|
static java.lang.Object |
getDefault()
Get default SSL socket factory delegate.
|
public static java.lang.Object getDefault()
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException, java.net.UnknownHostException
host
- The hostname that the socket connects to.port
- The port that the socket connects to.java.io.IOException
java.net.UnknownHostException
- When the hostname cannot be resolved to an
IP address.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.