In the SSLSocketInputRecord.decodeInputRecord() implementation: // skip the first byte: handshake type byte handshakeType = handshakeFrag.get(); The handshake type was not checked until the handshake message get fully parsed. It's nice to check that the handshake type is known here and fail fast. Similar to SSLEngineInputRecord.decodeInputRecord() and DTLSInputRecord.parseHandshakeMessage().
|