OpenJDK / jdk / jdk
changeset 53916:ca1a2ca32885
8215524: Finished message validation failure should be decrypt_error alert
Reviewed-by: xuelei
author | jjiang |
---|---|
date | Tue, 26 Feb 2019 07:26:29 +0800 |
parents | 7fec83061f24 |
children | 1ee9149df76f |
files | src/java.base/share/classes/sun/security/ssl/Finished.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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."); } }