'Check for a client_hello in client_request and handle setting up handlers and any mitm.
Returns if client_request was used(and should not be sent to the server)'

def _check_for_ssl(self, client_request):

    (record, ignored) = tls.parse_tls(client_request)
    client_hello = None
    if record:
        first = record.messages[0]
        if (isinstance(first, tls.types.HandshakeMessage) and isinstance(first.obj, tls.types.ClientHello)):
            client_hello = first.obj
    else:
        record = ssl2.parse_ssl2(client_request)
        if (record and isinstance(record.message.obj, ssl2.types.ClientHello)):
            client_hello = record.message.obj
    if (not client_hello):
        return False
    return self._handle_hello(client_hello)
