Top Description Fields Constructors Methods
ch.qos.logback.core.net.ssl

public Class SSLParametersConfiguration

extends ContextAwareBase
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .List, javax.net.ssl.SSLEngine, org.codehaus.janino.Java, ch.qos.logback.core.spi.ContextAwareBase, ch.qos.logback.core.util.OptionHelper, .StringCollectionUtil

A configuration of SSL parameters for an SSLEngine.
Authors
Carl Harris, Bruno Harbulot

Field Summary

Modifier and TypeField and Description
private String[]
private String[]
private String
private String
private Boolean
private String
private String
private Boolean
private Boolean
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
context

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
configure(SSLConfigurable
the subject configurable
socket
)

Configures SSL parameters on an SSLConfigurable.

private String[]

Returns:

enabled cipher suites
enabledCipherSuites
(String[]
cipher suites supported by the SSL engine
supportedCipherSuites
,
String[]
default cipher suites enabled by the SSL engine
defaultCipherSuites
)

Gets the set of enabled cipher suites based on the configuration.

private String[]

Returns:

enabled protocols
enabledProtocols
(String[]
protocols supported by the SSL engine
supportedProtocols
,
String[]
default protocols enabled by the SSL engine
defaultProtocols
)

Gets the set of enabled protocols based on the configuration.

public String

Returns:

a string containing comma-separated JSSE cipher suite names (e.g. TLS_DHE_RSA_WITH_AES_256_CBC_SHA)
getExcludedCipherSuites
()

Gets the JSSE cipher suite names to exclude.

public String

Returns:

a string containing comma-separated JSSE secure transport protocol names (e.g. TLSv1)
getExcludedProtocols
()

Gets the JSSE secure transport protocols to exclude.

public boolean
public String

Returns:

a string containing comma-separated JSSE cipher suite names (e.g. TLS_DHE_RSA_WITH_AES_256_CBC_SHA)
getIncludedCipherSuites
()

Gets the JSSE cipher suite names to include.

public String

Returns:

a string containing comma-separated JSSE secure transport protocol names (e.g. TLSv1)
getIncludedProtocols
()

Gets the JSSE secure transport protocols to include.

private String[]

Returns:

an array of strings containing those strings from defaults that match at least one pattern in included that are not matched by any pattern in excluded
includedStrings
(String[]
default list of string values
defaults
,
String
comma-separated patterns that identity values to include
included
,
String
comma-separated patterns that identity string to exclude
excluded
)

Applies include and exclude patterns to an array of default string values to produce an array of strings included by the patterns.

public Boolean

Returns:

flag state
isNeedClientAuth
()

Gets a flag indicating whether client authentication is required.

public Boolean

Returns:

flag state
isWantClientAuth
()

Gets a flag indicating whether client authentication is desired.

public void
setExcludedCipherSuites(String
a string containing comma-separated JSSE cipher suite names
cipherSuites
)

Sets the JSSE cipher suite names to exclude.

public void
setExcludedProtocols(String
a string containing comma-separated JSSE secure transport protocol names
protocols
)

Sets the JSSE secure transport protocols to exclude.

public void
setHostnameVerification(boolean hostnameVerification)

public void
setIncludedCipherSuites(String
a string containing comma-separated JSSE cipher suite names
cipherSuites
)

Sets the JSSE cipher suite names to include.

public void
setIncludedProtocols(String
a string containing comma-separated JSSE secure transport protocol names
protocols
)

Sets the JSSE secure transport protocols to include.

public void
setNeedClientAuth(Boolean
the flag state to set
needClientAuth
)

Sets a flag indicating whether client authentication is required.

public void
setWantClientAuth(Boolean
the flag state to set
wantClientAuth
)

Sets a flag indicating whether client authentication is desired.

private String[]

Returns:

array of values contained in s
stringToArray
(String
the subject string
s
)

Splits a string containing comma-separated values into an array.

Inherited from ch.qos.logback.core.spi.ContextAwareBase:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextgetDeclaredOrigingetStatusManagersetContext

Field Detail

enabledCipherSuitesback to summary
private String[] enabledCipherSuites
enabledProtocolsback to summary
private String[] enabledProtocols
excludedCipherSuitesback to summary
private String excludedCipherSuites
excludedProtocolsback to summary
private String excludedProtocols
hostnameVerificationback to summary
private Boolean hostnameVerification
includedCipherSuitesback to summary
private String includedCipherSuites
includedProtocolsback to summary
private String includedProtocols
needClientAuthback to summary
private Boolean needClientAuth
wantClientAuthback to summary
private Boolean wantClientAuth

Constructor Detail

SSLParametersConfigurationback to summary
public SSLParametersConfiguration()

Method Detail

configureback to summary
public void configure(SSLConfigurable socket)

Configures SSL parameters on an SSLConfigurable.

Parameters
socket:SSLConfigurable

the subject configurable

enabledCipherSuitesback to summary
private String[] enabledCipherSuites(String[] supportedCipherSuites, String[] defaultCipherSuites)

Gets the set of enabled cipher suites based on the configuration.

Parameters
supportedCipherSuites:String[]

cipher suites supported by the SSL engine

defaultCipherSuites:String[]

default cipher suites enabled by the SSL engine

Returns:String[]

enabled cipher suites

enabledProtocolsback to summary
private String[] enabledProtocols(String[] supportedProtocols, String[] defaultProtocols)

Gets the set of enabled protocols based on the configuration.

Parameters
supportedProtocols:String[]

protocols supported by the SSL engine

defaultProtocols:String[]

default protocols enabled by the SSL engine

Returns:String[]

enabled protocols

getExcludedCipherSuitesback to summary
public String getExcludedCipherSuites()

Gets the JSSE cipher suite names to exclude.

Returns:String

a string containing comma-separated JSSE cipher suite names (e.g. TLS_DHE_RSA_WITH_AES_256_CBC_SHA)

getExcludedProtocolsback to summary
public String getExcludedProtocols()

Gets the JSSE secure transport protocols to exclude.

Returns:String

a string containing comma-separated JSSE secure transport protocol names (e.g. TLSv1)

getHostnameVerificationback to summary
public boolean getHostnameVerification()
getIncludedCipherSuitesback to summary
public String getIncludedCipherSuites()

Gets the JSSE cipher suite names to include.

Returns:String

a string containing comma-separated JSSE cipher suite names (e.g. TLS_DHE_RSA_WITH_AES_256_CBC_SHA)

getIncludedProtocolsback to summary
public String getIncludedProtocols()

Gets the JSSE secure transport protocols to include.

Returns:String

a string containing comma-separated JSSE secure transport protocol names (e.g. TLSv1)

includedStringsback to summary
private String[] includedStrings(String[] defaults, String included, String excluded)

Applies include and exclude patterns to an array of default string values to produce an array of strings included by the patterns.

Parameters
defaults:String[]

default list of string values

included:String

comma-separated patterns that identity values to include

excluded:String

comma-separated patterns that identity string to exclude

Returns:String[]

an array of strings containing those strings from defaults that match at least one pattern in included that are not matched by any pattern in excluded

isNeedClientAuthback to summary
public Boolean isNeedClientAuth()

Gets a flag indicating whether client authentication is required.

Returns:Boolean

flag state

isWantClientAuthback to summary
public Boolean isWantClientAuth()

Gets a flag indicating whether client authentication is desired.

Returns:Boolean

flag state

setExcludedCipherSuitesback to summary
public void setExcludedCipherSuites(String cipherSuites)

Sets the JSSE cipher suite names to exclude.

Parameters
cipherSuites:String

a string containing comma-separated JSSE cipher suite names

See Also
Cryptography Architecture Standard Algorithm Name Documentation
setExcludedProtocolsback to summary
public void setExcludedProtocols(String protocols)

Sets the JSSE secure transport protocols to exclude.

Parameters
protocols:String

a string containing comma-separated JSSE secure transport protocol names

See Also
Cryptography Architecture Standard Algorithm Name Documentation
setHostnameVerificationback to summary
public void setHostnameVerification(boolean hostnameVerification)
setIncludedCipherSuitesback to summary
public void setIncludedCipherSuites(String cipherSuites)

Sets the JSSE cipher suite names to include.

Parameters
cipherSuites:String

a string containing comma-separated JSSE cipher suite names

See Also
Cryptography Architecture Standard Algorithm Name Documentation
setIncludedProtocolsback to summary
public void setIncludedProtocols(String protocols)

Sets the JSSE secure transport protocols to include.

Parameters
protocols:String

a string containing comma-separated JSSE secure transport protocol names

See Also
Cryptography Architecture Standard Algorithm Name Documentation
setNeedClientAuthback to summary
public void setNeedClientAuth(Boolean needClientAuth)

Sets a flag indicating whether client authentication is required.

Parameters
needClientAuth:Boolean

the flag state to set

setWantClientAuthback to summary
public void setWantClientAuth(Boolean wantClientAuth)

Sets a flag indicating whether client authentication is desired.

Parameters
wantClientAuth:Boolean

the flag state to set

stringToArrayback to summary
private String[] stringToArray(String s)

Splits a string containing comma-separated values into an array.

Parameters
s:String

the subject string

Returns:String[]

array of values contained in s