java.lang.Object | |||
↳ | javax.net.SocketFactory | ||
↳ | javax.net.ssl.SSLSocketFactory | ||
↳ | sun.security.ssl.SSLSocketFactoryImpl |
Implementation of an SSL socket factory. This provides the public hooks to create SSL sockets, using a "high level" programming interface which encapsulates system security policy defaults rather than offering application flexibility. In particular, it uses a configurable authentication context (and the keys held there) rather than offering any flexibility about which keys to use; that context defaults to the process-default context, but may be explicitly specified.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor used to instantiate the default factory.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an SSL connection to a named host at a specified port.
| |||||||||||
Constructs an SSL connection to a server at a specified address
and TCP port.
| |||||||||||
Constructs an SSL connection to a server at a specified address
and TCP port.
| |||||||||||
Returns a socket layered over an existing socket to a
ServerSocket on the named host, at the given port.
| |||||||||||
Constructs an SSL connection to a named host at a specified port.
| |||||||||||
Creates an unconnected socket.
| |||||||||||
Returns the subset of the supported cipher suites which are
enabled by default.
| |||||||||||
Returns the names of the cipher suites which could be enabled for use
on an SSL connection.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructor used to instantiate the default factory. This method is only called if the old "ssl.SocketFactory.provider" property in the java.security file is set.
Exception |
---|
Constructs an SSL connection to a named host at a specified port. This acts as the SSL client, and may authenticate itself or rejoin existing SSL sessions allowed by the authentication context which has been configured. The socket will also bind() to the local address and port supplied.
host | the server host |
---|---|
port | the server port |
clientAddress | the local address the socket is bound to |
clientPort | the local port the socket is bound to |
Socket
IOException |
---|
Constructs an SSL connection to a server at a specified address and TCP port. This acts as the SSL client, and may authenticate itself or rejoin existing SSL sessions allowed by the authentication context which has been configured. The socket will also bind() to the local address and port supplied.
address | the server network address |
---|---|
port | the server port |
clientAddress | the client network address |
clientPort | the client port |
Socket
IOException |
---|
Constructs an SSL connection to a server at a specified address and TCP port. This acts as the SSL client, and may authenticate itself or rejoin existing SSL sessions allowed by the authentication context which has been configured.
address | the server's host |
---|---|
port | its port |
Socket
IOException |
---|
Returns a socket layered over an existing socket to a ServerSocket on the named host, at the given port. This constructor can be used when tunneling SSL through a proxy. The host and port refer to the logical destination server. This socket is configured using the socket options established for this factory.
s | the existing socket |
---|---|
host | the server host |
port | the server port |
autoClose | close the underlying socket when this socket is closed |
IOException | if the connection can't be established |
---|---|
UnknownHostException | if the host is not known |
Constructs an SSL connection to a named host at a specified port. This acts as the SSL client, and may authenticate itself or rejoin existing SSL sessions allowed by the authentication context which has been configured.
host | name of the host with which to connect |
---|---|
port | number of the server's port |
Socket
IOException | |
---|---|
UnknownHostException |
Creates an unconnected socket.
Returns the subset of the supported cipher suites which are enabled by default. These cipher suites all provide a minimum quality of service whereby the server authenticates itself (preventing person-in-the-middle attacks) and where traffic is encrypted to provide confidentiality.
Returns the names of the cipher suites which could be enabled for use on an SSL connection. Normally, only a subset of these will actually be enabled by default, since this list may include cipher suites which do not support the mutual authentication of servers and clients, or which do not protect data confidentiality. Servers may also need certain kinds of certificates to use certain cipher suites.