blob: 5368e2ebf33e2e122916c2b518ee2c4d7f858bfd [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.update.verify;
/// An abstract representation of an update verifier, to be used when
/// verifying if an update should be committed. This is abstracted into a
/// separate protocol because in the future, we may add more verifiers.
///
/// This is unrelated to the verification in verified execution.
///
/// TODO(https://fxbug.dev/42133519) migrate to services design.
closed protocol Verifier {
/// Verifies the update we just applied does not compromise an OTA dependency.
/// If the verification fails, the [`Verifier`] should log the reason why.
///
/// The caller is responsible for setting any timeouts.
///
/// + request `options` the configuration to use when verifying.
/// * error a value describing the cause of verification failure.
strict Verify(struct {
options @generated_name("VerifyOptions") table {};
}) -> () error @generated_name("VerifyError") flexible enum {
/// A problem occurred when doing update verification.
INTERNAL = 1;
};
};
/// An update verifier to determine if Blobfs is working as expected.
@discoverable
closed protocol BlobfsVerifier {
compose Verifier;
};
/// An update verifier to determine if Netstack is working as expected.
@discoverable
closed protocol NetstackVerifier {
compose Verifier;
};