jdk/src/java.base/share/classes/sun/security/ssl/SSLServerSocketImpl.java
changeset 32649 2ee9017c7597
parent 30904 ec0224270f90
child 34380 2b2609379881
equal deleted inserted replaced
32648:1fa861caf840 32649:2ee9017c7597
   182      * Returns the list of cipher suites which are currently enabled
   182      * Returns the list of cipher suites which are currently enabled
   183      * for use by newly accepted connections.  A null return indicates
   183      * for use by newly accepted connections.  A null return indicates
   184      * that the system defaults are in effect.
   184      * that the system defaults are in effect.
   185      */
   185      */
   186     @Override
   186     @Override
   187     synchronized public String[] getEnabledCipherSuites() {
   187     public synchronized String[] getEnabledCipherSuites() {
   188         return enabledCipherSuites.toStringArray();
   188         return enabledCipherSuites.toStringArray();
   189     }
   189     }
   190 
   190 
   191     /**
   191     /**
   192      * Controls which particular SSL cipher suites are enabled for use
   192      * Controls which particular SSL cipher suites are enabled for use
   194      *
   194      *
   195      * @param suites Names of all the cipher suites to enable; null
   195      * @param suites Names of all the cipher suites to enable; null
   196      *  means to accept system defaults.
   196      *  means to accept system defaults.
   197      */
   197      */
   198     @Override
   198     @Override
   199     synchronized public void setEnabledCipherSuites(String[] suites) {
   199     public synchronized void setEnabledCipherSuites(String[] suites) {
   200         enabledCipherSuites = new CipherSuiteList(suites);
   200         enabledCipherSuites = new CipherSuiteList(suites);
   201     }
   201     }
   202 
   202 
   203     @Override
   203     @Override
   204     public String[] getSupportedProtocols() {
   204     public String[] getSupportedProtocols() {
   213      * @param protocols protocols to enable.
   213      * @param protocols protocols to enable.
   214      * @exception IllegalArgumentException when one of the protocols
   214      * @exception IllegalArgumentException when one of the protocols
   215      *  named by the parameter is not supported.
   215      *  named by the parameter is not supported.
   216      */
   216      */
   217     @Override
   217     @Override
   218     synchronized public void setEnabledProtocols(String[] protocols) {
   218     public synchronized void setEnabledProtocols(String[] protocols) {
   219         enabledProtocols = new ProtocolList(protocols);
   219         enabledProtocols = new ProtocolList(protocols);
   220     }
   220     }
   221 
   221 
   222     @Override
   222     @Override
   223     synchronized public String[] getEnabledProtocols() {
   223     public synchronized String[] getEnabledProtocols() {
   224         return enabledProtocols.toStringArray();
   224         return enabledProtocols.toStringArray();
   225     }
   225     }
   226 
   226 
   227     /**
   227     /**
   228      * Controls whether the connections which are accepted must include
   228      * Controls whether the connections which are accepted must include
   301 
   301 
   302     /**
   302     /**
   303      * Returns the SSLParameters in effect for newly accepted connections.
   303      * Returns the SSLParameters in effect for newly accepted connections.
   304      */
   304      */
   305     @Override
   305     @Override
   306     synchronized public SSLParameters getSSLParameters() {
   306     public synchronized SSLParameters getSSLParameters() {
   307         SSLParameters params = super.getSSLParameters();
   307         SSLParameters params = super.getSSLParameters();
   308 
   308 
   309         // the super implementation does not handle the following parameters
   309         // the super implementation does not handle the following parameters
   310         params.setEndpointIdentificationAlgorithm(identificationProtocol);
   310         params.setEndpointIdentificationAlgorithm(identificationProtocol);
   311         params.setAlgorithmConstraints(algorithmConstraints);
   311         params.setAlgorithmConstraints(algorithmConstraints);
   318 
   318 
   319     /**
   319     /**
   320      * Applies SSLParameters to newly accepted connections.
   320      * Applies SSLParameters to newly accepted connections.
   321      */
   321      */
   322     @Override
   322     @Override
   323     synchronized public void setSSLParameters(SSLParameters params) {
   323     public synchronized void setSSLParameters(SSLParameters params) {
   324         super.setSSLParameters(params);
   324         super.setSSLParameters(params);
   325 
   325 
   326         // the super implementation does not handle the following parameters
   326         // the super implementation does not handle the following parameters
   327         identificationProtocol = params.getEndpointIdentificationAlgorithm();
   327         identificationProtocol = params.getEndpointIdentificationAlgorithm();
   328         algorithmConstraints = params.getAlgorithmConstraints();
   328         algorithmConstraints = params.getAlgorithmConstraints();