src/java.base/share/classes/sun/security/ssl/Finished.java
changeset 53916 ca1a2ca32885
parent 53734 cb1642ccc732
child 55336 c2398053ee90
child 58678 9cf78a70fa4f
--- a/src/java.base/share/classes/sun/security/ssl/Finished.java	Mon Feb 25 14:45:29 2019 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/Finished.java	Tue Feb 26 07:26:29 2019 +0800
@@ -102,7 +102,7 @@
             }
 
             if (m.remaining() != verifyDataLen) {
-                throw context.conContext.fatal(Alert.ILLEGAL_PARAMETER,
+                throw context.conContext.fatal(Alert.DECODE_ERROR,
                     "Inappropriate finished message: need " + verifyDataLen +
                     " but remaining " + m.remaining() + " bytes verify_data");
             }
@@ -120,7 +120,7 @@
                         "Failed to generate verify_data", ioe);
             }
             if (!MessageDigest.isEqual(myVerifyData, verifyData)) {
-                throw context.conContext.fatal(Alert.ILLEGAL_PARAMETER,
+                throw context.conContext.fatal(Alert.DECRYPT_ERROR,
                         "The Finished message cannot be verified.");
             }
         }