diff -r 7fec83061f24 -r ca1a2ca32885 src/java.base/share/classes/sun/security/ssl/Finished.java --- 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."); } }