Package javax.net.ssl

Class SSLParameters


  • public class SSLParameters
    extends Object
    SSL handshake parameters that include protocols, cipher suites, and client authentication requirements.
    Since:
    1.6
    • Constructor Detail

      • SSLParameters

        public SSLParameters()
        The default SSLParameters constructor. Cipher suites and protocols are initialized to null and client authentication options are initialized to false.
      • SSLParameters

        public SSLParameters​(String[] cipherSuites)
        A SSLParameters constructor that allows the values for the initial cipher suites array to be provided. Other values default as specified in SSLParameters().
        Parameters:
        cipherSuites - An array of cipherSuites that is cloned for use within the SSLParameters, or null.
      • SSLParameters

        public SSLParameters​(String[] cipherSuites,
                             String[] protocols)
        A SSLParameters constructor that allows the values for initial cipher suites and protocols arrays to be provided. Other values default as specified in SSLParameters().
        Parameters:
        cipherSuites - An array of cipher names that is cloned for use within the SSLParameters, or null.
        protocols - An array of protocol names that is cloned for use within the SSLParameters, or null.
    • Method Detail

      • getCipherSuites

        public String[] getCipherSuites()
        Returns a copy of the cipher suites, or null if none have been specified.
      • setCipherSuites

        public void setCipherSuites​(String[] cipherSuites)
        Sets the cipher suites to a copy of the input, or null
      • getProtocols

        public String[] getProtocols()
        Returns a copy of the protocols, or null if none have been specified.
      • setProtocols

        public void setProtocols​(String[] protocols)
        Sets the protocols to a copy of the input, or null
      • getNeedClientAuth

        public boolean getNeedClientAuth()
        Returns true if a server requires authentication from a client during handshaking. If this returns true, getWantClientAuth() will return false.
      • setNeedClientAuth

        public void setNeedClientAuth​(boolean needClientAuth)
        Sets whether or not to a server needs client authentication. After calling this, #getWantClientAuth() will return false.
      • getWantClientAuth

        public boolean getWantClientAuth()
        Returns true if a server optionally wants to authenticate a client during handshaking. If this returns true, getNeedClientAuth() will return false.
      • setWantClientAuth

        public void setWantClientAuth​(boolean wantClientAuth)
        Sets whether or not to a server wants client authentication. After calling this, #getNeedClientAuth() will return false.