mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8228757: Fail fast if the handshake type is unknown
Reviewed-by: jnimeh
This commit is contained in:
parent
94130be62e
commit
c299c4fd46
4 changed files with 39 additions and 3 deletions
|
@ -497,6 +497,16 @@ enum SSLHandshake implements SSLConsumer, HandshakeProducer {
|
|||
return "UNKNOWN-HANDSHAKE-MESSAGE(" + id + ")";
|
||||
}
|
||||
|
||||
static boolean isKnown(byte id) {
|
||||
for (SSLHandshake hs : SSLHandshake.values()) {
|
||||
if (hs.id == id && id != NOT_APPLICABLE.id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static final void kickstart(HandshakeContext context) throws IOException {
|
||||
if (context instanceof ClientHandshakeContext) {
|
||||
// For initial handshaking, including session resumption,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue