8215524: Finished message validation failure should be decrypt_error alert
Reviewed-by: xuelei
This commit is contained in:
parent
1610706716
commit
e4fd3054fc
@ -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.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user