src/java.base/share/classes/sun/security/ssl/SSLConfiguration.java
branchJDK-8145252-TLS13-branch
changeset 56702 75527e40bdfd
parent 56542 56aaa6cb3693
child 56718 da9979451b7a
equal deleted inserted replaced
56701:5d76e867b5cd 56702:75527e40bdfd
   340 
   340 
   341         return extensions.toArray(new SSLExtension[0]);
   341         return extensions.toArray(new SSLExtension[0]);
   342     }
   342     }
   343 
   343 
   344     /**
   344     /**
       
   345      * Get the enabled extensions for the specific handshake message, excluding
       
   346      * the specified extensions.
       
   347      *
       
   348      * Used to consume handshake extensions.
       
   349      */
       
   350     SSLExtension[] getExclusiveExtensions(SSLHandshake handshakeType,
       
   351             List<SSLExtension> excluded) {
       
   352         List<SSLExtension> extensions = new ArrayList<>();
       
   353         for (SSLExtension extension : SSLExtension.values()) {
       
   354             if (extension.handshakeType == handshakeType) {
       
   355                 if (isAvailable(extension) && !excluded.contains(extension)) {
       
   356                     extensions.add(extension);
       
   357                 }
       
   358             }
       
   359         }
       
   360 
       
   361         return extensions.toArray(new SSLExtension[0]);
       
   362     }
       
   363 
       
   364     /**
   345      * Get the enabled extensions for the specific handshake message
   365      * Get the enabled extensions for the specific handshake message
   346      * and the specific protocol version.
   366      * and the specific protocol version.
   347      *
   367      *
   348      * Used to produce handshake extensions after handshake protocol
   368      * Used to produce handshake extensions after handshake protocol
   349      * version negotiation.
   369      * version negotiation.