java.lang.Object | |
↳ | javax.net.ssl.SSLParameters |
Encapsulates parameters for an SSL/TLS connection. The parameters are the list of ciphersuites to be accepted in an SSL/TLS handshake, the list of protocols to be allowed, and whether SSL/TLS servers should request or require client authentication.
SSLParameters can be created via the constructors in this class.
Objects can also be obtained using the getSSLParameters()
methods in
SSLSocket
and
SSLEngine
or the
getDefaultSSLParameters()
and
getSupportedSSLParameters()
methods in SSLContext
.
SSLParameters can be applied to a connection via the methods
SSLSocket.setSSLParameters()
and
SSLEngine.getSSLParameters()
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs SSLParameters.
| |||||||||||
Constructs SSLParameters from the specified array of ciphersuites.
| |||||||||||
Constructs SSLParameters from the specified array of ciphersuites
and protocols.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a copy of the array of ciphersuites or null if none
have been set.
| |||||||||||
Returns whether client authentication should be required.
| |||||||||||
Returns a copy of the array of protocols or null if none
have been set.
| |||||||||||
Returns whether client authentication should be requested.
| |||||||||||
Sets the array of ciphersuites.
| |||||||||||
Sets whether client authentication should be required.
| |||||||||||
Sets the array of protocols.
| |||||||||||
Sets whether client authentication should be requested.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs SSLParameters.
The cipherSuites and protocols values are set to null
,
wantClientAuth and needClientAuth are set to false
.
Constructs SSLParameters from the specified array of ciphersuites.
Calling this constructor is equivalent to calling the no-args
constructor followed by
setCipherSuites(cipherSuites);
.
cipherSuites | the array of ciphersuites (or null) |
---|
Constructs SSLParameters from the specified array of ciphersuites
and protocols.
Calling this constructor is equivalent to calling the no-args
constructor followed by
setCipherSuites(cipherSuites); setProtocols(protocols);
.
cipherSuites | the array of ciphersuites (or null) |
---|---|
protocols | the array of protocols (or null) |
Returns a copy of the array of ciphersuites or null if none have been set.
Returns whether client authentication should be required.
Returns a copy of the array of protocols or null if none have been set.
Returns whether client authentication should be requested.
Sets the array of ciphersuites.
cipherSuites | the array of ciphersuites (or null) |
---|
Sets whether client authentication should be required. Calling
this method clears the wantClientAuth
flag.
needClientAuth | whether client authentication should be required |
---|
Sets the array of protocols.
protocols | the array of protocols (or null) |
---|
Sets whether client authentication should be requested. Calling
this method clears the needClientAuth
flag.
wantClientAuth | whether client authentication should be requested |
---|