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

Print this page
rev 10851 : Implement TLS_FALLBACK_SCSV

@@ -81,10 +81,13 @@
     static final byte           alert_certificate_unobtainable = 111;
     static final byte           alert_unrecognized_name = 112;
     static final byte           alert_bad_certificate_status_response = 113;
     static final byte           alert_bad_certificate_hash_value = 114;
 
+    // Sent in response to a TLS_FALLBACK_SCSV-induced handshake failure.
+    static final byte           alert_inappropriate_fallback = 86;
+
     static String alertDescription(byte code) {
         switch (code) {
 
         case alert_close_notify:
             return "close_notify";

@@ -142,10 +145,12 @@
             return "unrecognized_name";
         case alert_bad_certificate_status_response:
             return "bad_certificate_status_response";
         case alert_bad_certificate_hash_value:
             return "bad_certificate_hash_value";
+        case alert_inappropriate_fallback:
+            return "inappropriate_fallback";
 
         default:
             return "<UNKNOWN ALERT: " + (code & 0x0ff) + ">";
         }
     }

@@ -187,10 +192,11 @@
         case alert_unsupported_extension:
         case alert_certificate_unobtainable:
         case alert_unrecognized_name:
         case alert_bad_certificate_status_response:
         case alert_bad_certificate_hash_value:
+        case alert_inappropriate_fallback:
             e = new SSLHandshakeException(reason);
             break;
 
         case alert_close_notify:
         case alert_unexpected_message: