def _begin_validation(
        session: UpdateSession,
        config: config.Config,
        loop: asyncio.AbstractEventLoop,
        downloaded_update_path: str)\
        -> asyncio.futures.Future:
    """ Start the validation process. """
    session.set_stage(Stages.VALIDATING)
    cert_path = config.update_cert_path\
        if config.signature_required else None

    validation_future \
        = asyncio.ensure_future(loop.run_in_executor(
            None, file_actions.validate_update,
            downloaded_update_path, session.set_progress, cert_path))

    def validation_done(fut):
        exc = fut.exception()
        if exc:
            session.set_error(getattr(exc, 'short', str(type(exc))),
                              str(exc))
        else:
            rootfs_file = fut.result()
            loop.call_soon_threadsafe(_begin_write,
                                      session,
                                      loop,
                                      rootfs_file)
    validation_future.add_done_callback(validation_done)
    return validation_future
Start the validation process.