Arrays::equals is exclusive, fix RandomCookie JDK-8145252-TLS13-branch
authorxuelei
Wed, 06 Jun 2018 09:39:14 -0700
branchJDK-8145252-TLS13-branch
changeset 56683 cf2370de8673
parent 56674 d2ba9e6f1cac
child 56684 89bfd8e0ff19
Arrays::equals is exclusive, fix RandomCookie
src/java.base/share/classes/sun/security/ssl/RandomCookie.java
--- a/src/java.base/share/classes/sun/security/ssl/RandomCookie.java	Tue Jun 05 12:01:35 2018 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/RandomCookie.java	Wed Jun 06 09:39:14 2018 -0700
@@ -130,10 +130,10 @@
     }
 
     private boolean isT12Downgrade() {
-        return Arrays.equals(randomBytes, 24, 31, t12Protection, 0, 7);
+        return Arrays.equals(randomBytes, 24, 32, t12Protection, 0, 8);
     }
 
     private boolean isT11Downgrade() {
-        return Arrays.equals(randomBytes, 24, 31, t11Protection, 0, 7);
+        return Arrays.equals(randomBytes, 24, 32, t11Protection, 0, 8);
     }
 }