SSLParameters (Java Platform SE 7 ) (original) (raw)
- javax.net.ssl.SSLParameters
public class SSLParameters
extends Object
Since:
1.6
See Also:
SSLSocket, SSLEngine, SSLContext
Constructor Summary
Constructors
Constructor and Description SSLParameters() Constructs SSLParameters. SSLParameters(String[] cipherSuites) Constructs SSLParameters from the specified array of ciphersuites. SSLParameters(String[] cipherSuites,String[] protocols) Constructs SSLParameters from the specified array of ciphersuites and protocols. Method Summary
Methods
Modifier and Type Method and Description AlgorithmConstraints getAlgorithmConstraints() Returns the cryptographic algorithm constraints. String[] getCipherSuites() Returns a copy of the array of ciphersuites or null if none have been set. String getEndpointIdentificationAlgorithm() Gets the endpoint identification algorithm. boolean getNeedClientAuth() Returns whether client authentication should be required. String[] getProtocols() Returns a copy of the array of protocols or null if none have been set. boolean getWantClientAuth() Returns whether client authentication should be requested. void setAlgorithmConstraints(AlgorithmConstraints constraints) Sets the cryptographic algorithm constraints, which will be used in addition to any configured by the runtime environment. void setCipherSuites(String[] cipherSuites) Sets the array of ciphersuites. void setEndpointIdentificationAlgorithm(String algorithm) Sets the endpoint identification algorithm. void setNeedClientAuth(boolean needClientAuth) Sets whether client authentication should be required. void setProtocols(String[] protocols) Sets the array of protocols. void setWantClientAuth(boolean wantClientAuth) Sets whether client authentication should be requested. * ### Methods inherited from class java.lang.[Object](../../../java/lang/Object.html "class in java.lang") `[clone](../../../java/lang/Object.html#clone%28%29), [equals](../../../java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../java/lang/Object.html#finalize%28%29), [getClass](../../../java/lang/Object.html#getClass%28%29), [hashCode](../../../java/lang/Object.html#hashCode%28%29), [notify](../../../java/lang/Object.html#notify%28%29), [notifyAll](../../../java/lang/Object.html#notifyAll%28%29), [toString](../../../java/lang/Object.html#toString%28%29), [wait](../../../java/lang/Object.html#wait%28%29), [wait](../../../java/lang/Object.html#wait%28long%29), [wait](../../../java/lang/Object.html#wait%28long,%20int%29)`
Constructor Detail
* #### SSLParameters public SSLParameters() Constructs SSLParameters. The cipherSuites and protocols values are set to `null`, wantClientAuth and needClientAuth are set to `false`. * #### SSLParameters public SSLParameters([String](../../../java/lang/String.html "class in java.lang")[] cipherSuites) Constructs SSLParameters from the specified array of ciphersuites. Calling this constructor is equivalent to calling the no-args constructor followed by`setCipherSuites(cipherSuites);`. Parameters: `cipherSuites` \- the array of ciphersuites (or null) * #### SSLParameters public SSLParameters([String](../../../java/lang/String.html "class in java.lang")[] cipherSuites, [String](../../../java/lang/String.html "class in java.lang")[] protocols) 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);`. Parameters: `cipherSuites` \- the array of ciphersuites (or null) `protocols` \- the array of protocols (or null)
Method Detail
* #### getCipherSuites public [String](../../../java/lang/String.html "class in java.lang")[] getCipherSuites() Returns a copy of the array of ciphersuites or null if none have been set. Returns: a copy of the array of ciphersuites or null if none have been set. * #### setCipherSuites public void setCipherSuites([String](../../../java/lang/String.html "class in java.lang")[] cipherSuites) Sets the array of ciphersuites. Parameters: `cipherSuites` \- the array of ciphersuites (or null) * #### getProtocols public [String](../../../java/lang/String.html "class in java.lang")[] getProtocols() Returns a copy of the array of protocols or null if none have been set. Returns: a copy of the array of protocols or null if none have been set. * #### setProtocols public void setProtocols([String](../../../java/lang/String.html "class in java.lang")[] protocols) Sets the array of protocols. Parameters: `protocols` \- the array of protocols (or null) * #### getWantClientAuth public boolean getWantClientAuth() Returns whether client authentication should be requested. Returns: whether client authentication should be requested. * #### setWantClientAuth public void setWantClientAuth(boolean wantClientAuth) Sets whether client authentication should be requested. Calling this method clears the `needClientAuth` flag. Parameters: `wantClientAuth` \- whether client authentication should be requested * #### getNeedClientAuth public boolean getNeedClientAuth() Returns whether client authentication should be required. Returns: whether client authentication should be required. * #### setNeedClientAuth public void setNeedClientAuth(boolean needClientAuth) Sets whether client authentication should be required. Calling this method clears the `wantClientAuth` flag. Parameters: `needClientAuth` \- whether client authentication should be required * #### getAlgorithmConstraints public [AlgorithmConstraints](../../../java/security/AlgorithmConstraints.html "interface in java.security") getAlgorithmConstraints() Returns the cryptographic algorithm constraints. Returns: the cryptographic algorithm constraints, or null if the constraints have not been set Since: 1.7 See Also: [setAlgorithmConstraints(AlgorithmConstraints)](../../../javax/net/ssl/SSLParameters.html#setAlgorithmConstraints%28java.security.AlgorithmConstraints%29) * #### setAlgorithmConstraints public void setAlgorithmConstraints([AlgorithmConstraints](../../../java/security/AlgorithmConstraints.html "interface in java.security") constraints) Sets the cryptographic algorithm constraints, which will be used in addition to any configured by the runtime environment. If the `constraints` parameter is non-null, every cryptographic algorithm, key and algorithm parameters used in the SSL/TLS handshake must be permitted by the constraints. Parameters: `constraints` \- the algorithm constraints (or null) Since: 1.7 * #### getEndpointIdentificationAlgorithm public [String](../../../java/lang/String.html "class in java.lang") getEndpointIdentificationAlgorithm() Gets the endpoint identification algorithm. Returns: the endpoint identification algorithm, or null if none has been set. Since: 1.7 See Also: [X509ExtendedTrustManager](../../../javax/net/ssl/X509ExtendedTrustManager.html "class in javax.net.ssl"), [setEndpointIdentificationAlgorithm(String)](../../../javax/net/ssl/SSLParameters.html#setEndpointIdentificationAlgorithm%28java.lang.String%29) * #### setEndpointIdentificationAlgorithm public void setEndpointIdentificationAlgorithm([String](../../../java/lang/String.html "class in java.lang") algorithm) Sets the endpoint identification algorithm. If the `algorithm` parameter is non-null or non-empty, the endpoint identification/verification procedures must be handled during SSL/TLS handshaking. This is to prevent man-in-the-middle attacks. Parameters: `algorithm` \- The standard string name of the endpoint identification algorithm (or null). See Appendix A in the [ Java Cryptography Architecture API Specification & Reference ](../../../../technotes/guides/security/crypto/CryptoSpec.html#AppA) for information about standard algorithm names. Since: 1.7 See Also: [X509ExtendedTrustManager](../../../javax/net/ssl/X509ExtendedTrustManager.html "class in javax.net.ssl")
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.