diff --git a/src/ssl-protocol.pac b/src/ssl-protocol.pac index 627645e4da..5bfa2c51f1 100644 --- a/src/ssl-protocol.pac +++ b/src/ssl-protocol.pac @@ -425,6 +425,10 @@ type ServerHello(rec: SSLRecord) = record { session_id : uint8[session_len]; cipher_suite : uint16[1]; compression_method : uint8; + # This weirdness is to deal with the possible existence or absence + # of the following fields. + ext_len: uint16[] &until($element == 0 || $element != 0); + extensions : SSLExtension(rec)[] &until($input.length() == 0); } &let { state_changed : bool = $context.connection.transition(STATE_CLIENT_HELLO_RCVD,