Package org.wildfly.security.ssl
Class SSLConnection
java.lang.Object
org.wildfly.security.ssl.SSLConnection
An SSL connection of some sort.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptionstatic SSLConnectionCreate aSSLConnectionfor the given SSL engine.static SSLConnectionforSession(SSLSession session, boolean clientMode) Create aSSLConnectionfor the given SSL socket.static SSLConnectionCreate aSSLConnectionfor the given SSL socket.byte[]getChannelBinding(String bindingType) Get the channel binding of the given type from this connection.abstract SSLSessionGet the SSL session associated with this connection.voidPopulate the given channel binding callback with any channel binding data that might be present on this connection.abstract booleanGet the client-mode flag for this connection.
-
Method Details
-
getSession
Get the SSL session associated with this connection.- Returns:
- the SSL session associated with this connection, or
nullif there is none
-
isClientMode
public abstract boolean isClientMode()Get the client-mode flag for this connection.- Returns:
- the client-mode flag for this connection
-
getChannelBinding
Get the channel binding of the given type from this connection. If the data is not present or the type is not supported,nullis returned.- Returns:
- the channel binding of the given type from this connection, or
nullif it is not supported
-
handleChannelBindingCallback
Populate the given channel binding callback with any channel binding data that might be present on this connection. If no channel binding seems to be supported, then the callback will be left unpopulated.- Parameters:
callback- the binding callback to populate (must not benull)
-
forEngine
Create aSSLConnectionfor the given SSL engine.- Parameters:
engine- the SSL engine (must not benull)- Returns:
- the SSL connection (not
null)
-
forSocket
Create aSSLConnectionfor the given SSL socket.- Parameters:
socket- the SSL socket (must not benull)- Returns:
- the SSL connection (not
null)
-
forSession
Create aSSLConnectionfor the given SSL socket. Since no connection information will be available in this case, not all channel binding modes will be supported.- Parameters:
session- the SSL session (must not benull)clientMode-trueif the session is client-side,falseif it is server-side- Returns:
- the SSL connection (not
null)
-