8215524: Finished message validation failure should be decrypt_error alert

Reviewed-by: xuelei
This commit is contained in:
John Jiang 2019-02-26 07:26:29 +08:00
parent 1610706716
commit e4fd3054fc

View File

@ -102,7 +102,7 @@ final class Finished {
}
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 @@ final class Finished {
"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.");
}
}