< prev index next >
src/share/classes/sun/security/ssl/SSLHandshake.java
Print this page
rev 14411 : 8228757: Fail fast if the handshake type is unknown
Reviewed-by: jnimeh
*** 476,485 ****
--- 476,495 ----
}
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,
// ClientHello message is used as the kickstart message.
//
< prev index next >