src/java.base/share/classes/sun/security/ssl/Handshaker.java

Print this page
rev 10851 : Implement TLS_FALLBACK_SCSV

@@ -151,10 +151,14 @@
     // Note that in this provider, this option only applies to server side.
     // Local cipher suites preference is always honored in client side in
     // this provider.
     boolean preferLocalCipherSuites = false;
 
+    // Whether to send TLS_FALLBACK_SCSV as part of the cipher suite
+    // list in the Client Hello.
+    boolean sendFallbackSCSV;
+
     // Temporary storage for the individual keys. Set by
     // calculateConnectionKeys() and cleared once the ciphers are
     // activated.
     private SecretKey clntWriteKey, svrWriteKey;
     private IvParameterSpec clntWriteIV, svrWriteIV;

@@ -479,10 +483,17 @@
     void setUseCipherSuitesOrder(boolean on) {
         this.preferLocalCipherSuites = on;
     }
 
     /**
+     * Sets whether to send TLS_FALLBACK_SCSV.
+     */
+    void setSendFallbackSCSV(boolean on) {
+        this.sendFallbackSCSV = on;
+    }
+
+    /**
      * Prior to handshaking, activate the handshake and initialize the version,
      * input stream and output stream.
      */
     void activate(ProtocolVersion helloVersion) throws IOException {
         if (activeProtocols == null) {