mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8215524: Finished message validation failure should be decrypt_error alert
Reviewed-by: xuelei
This commit is contained in:
parent
1610706716
commit
e4fd3054fc
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ final class Finished {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.remaining() != verifyDataLen) {
|
if (m.remaining() != verifyDataLen) {
|
||||||
throw context.conContext.fatal(Alert.ILLEGAL_PARAMETER,
|
throw context.conContext.fatal(Alert.DECODE_ERROR,
|
||||||
"Inappropriate finished message: need " + verifyDataLen +
|
"Inappropriate finished message: need " + verifyDataLen +
|
||||||
" but remaining " + m.remaining() + " bytes verify_data");
|
" but remaining " + m.remaining() + " bytes verify_data");
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ final class Finished {
|
||||||
"Failed to generate verify_data", ioe);
|
"Failed to generate verify_data", ioe);
|
||||||
}
|
}
|
||||||
if (!MessageDigest.isEqual(myVerifyData, verifyData)) {
|
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.");
|
"The Finished message cannot be verified.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue