Package org.bouncycastle.jsse
Interface BCSSLSocket
public interface BCSSLSocket
A BCJSSE-specific interface to expose extended functionality on
SSLSocket
implementations.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns an accessor for extended SSL connection data.Returns aBCSSLParameters
with properties reflecting the current configuration.void
void
setBCSessionToResume
(BCExtendedSSLSession session) void
Allows explicit setting of the 'host'String
when theSocketFactory
methods that include it as an argument are not used.void
setParameters
(BCSSLParameters parameters) Sets parameters according to the properties in aBCSSLParameters
.
-
Method Details
-
connect
- Throws:
IOException
-
getApplicationProtocol
String getApplicationProtocol() -
getBCHandshakeApplicationProtocolSelector
BCApplicationProtocolSelector<SSLSocket> getBCHandshakeApplicationProtocolSelector() -
setBCHandshakeApplicationProtocolSelector
-
setBCSessionToResume
-
getBCHandshakeSession
BCExtendedSSLSession getBCHandshakeSession() -
getBCSession
BCExtendedSSLSession getBCSession() -
getConnection
BCSSLConnection getConnection()Returns an accessor for extended SSL connection data. This method will initiate the initial handshake if necessary and then block until the handshake has been established. If an error occurs during the initial handshake, this method returnsnull
.- Returns:
- A
BCSSLConnection
instance.
-
getHandshakeApplicationProtocol
String getHandshakeApplicationProtocol() -
getParameters
BCSSLParameters getParameters()Returns aBCSSLParameters
with properties reflecting the current configuration.- Returns:
- the current
parameters
-
setHost
Allows explicit setting of the 'host'String
when theSocketFactory
methods that include it as an argument are not used.Must be called prior to attempting to connect the socket to have any effect.
- Parameters:
host
- the server host name with which to connect, ornull
for the loopback address.
-
setParameters
Sets parameters according to the properties in aBCSSLParameters
.Note that any properties set to null will be ignored, which will leave the corresponding settings unchanged.
- Parameters:
parameters
- theparameters
to set- Throws:
IllegalArgumentException
- if the cipherSuites or protocols properties contain unsupported values
-