'Handles the changing of handlers on a TLS client hello and optional mitm
Returns if a MiTM was created'

def _handle_hello(self, client_hello):

    if (not self.hostname):
        server_name = client_hello.extensions.get(Extension.TYPE.SERVER_NAME)
        if server_name:
            server_name = server_name.data
            self.hostname = server_name
    handler_class = self.ssl_handler_selector(self, client_hello, self.app_blame)
    if handler_class:
        handler = handler_class(self)
        self.handler.on_remove()
        self.handler = handler
        self.handler.on_select()
    should_mitm = self.handler.on_ssl(client_hello)
    for handler in self.data_handlers:
        handler.on_ssl(client_hello)
    if should_mitm:
        self.start_ssl_mitm(client_hello)
        return True
    return False
