mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8231780: Better TLS messaging support
Reviewed-by: ascarpino, rhalade, mschoene
This commit is contained in:
parent
a0f8febb8b
commit
c5f884c6d1
4 changed files with 83 additions and 2 deletions
|
@ -589,6 +589,16 @@ final class Finished {
|
|||
|
||||
private void onConsumeFinished(ServerHandshakeContext shc,
|
||||
ByteBuffer message) throws IOException {
|
||||
// Make sure that any expected CertificateVerify message
|
||||
// has been received and processed.
|
||||
if (!shc.isResumption) {
|
||||
if (shc.handshakeConsumers.containsKey(
|
||||
SSLHandshake.CERTIFICATE_VERIFY.id)) {
|
||||
throw shc.conContext.fatal(Alert.UNEXPECTED_MESSAGE,
|
||||
"Unexpected Finished handshake message");
|
||||
}
|
||||
}
|
||||
|
||||
FinishedMessage fm = new FinishedMessage(shc, message);
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
|
||||
SSLLogger.fine(
|
||||
|
@ -883,6 +893,16 @@ final class Finished {
|
|||
|
||||
private void onConsumeFinished(ClientHandshakeContext chc,
|
||||
ByteBuffer message) throws IOException {
|
||||
// Make sure that any expected CertificateVerify message
|
||||
// has been received and processed.
|
||||
if (!chc.isResumption) {
|
||||
if (chc.handshakeConsumers.containsKey(
|
||||
SSLHandshake.CERTIFICATE_VERIFY.id)) {
|
||||
throw chc.conContext.fatal(Alert.UNEXPECTED_MESSAGE,
|
||||
"Unexpected Finished handshake message");
|
||||
}
|
||||
}
|
||||
|
||||
FinishedMessage fm = new FinishedMessage(chc, message);
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
|
||||
SSLLogger.fine(
|
||||
|
@ -1005,6 +1025,16 @@ final class Finished {
|
|||
|
||||
private void onConsumeFinished(ServerHandshakeContext shc,
|
||||
ByteBuffer message) throws IOException {
|
||||
// Make sure that any expected CertificateVerify message
|
||||
// has been received and processed.
|
||||
if (!shc.isResumption) {
|
||||
if (shc.handshakeConsumers.containsKey(
|
||||
SSLHandshake.CERTIFICATE_VERIFY.id)) {
|
||||
throw shc.conContext.fatal(Alert.UNEXPECTED_MESSAGE,
|
||||
"Unexpected Finished handshake message");
|
||||
}
|
||||
}
|
||||
|
||||
FinishedMessage fm = new FinishedMessage(shc, message);
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
|
||||
SSLLogger.fine(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue