chromium/services/network/public/mojom/ct_log_info.mojom

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module network.mojom;

import "mojo/public/mojom/base/byte_string.mojom";
import "mojo/public/mojom/base/time.mojom";

// Structure used to hold information about previous operators for a log.
struct PreviousOperatorEntry {
  // Name of the operator.
  string name;
  // Time when operator stopped operating this log.
  mojo_base.mojom.Time end_time;
};

// A single Certificate Transparency Log configuration.
struct CTLogInfo {
  // LogID found in SCTs issued by this log.
  mojo_base.mojom.ByteString id;

  // The DER-encoded SubjectPublicKeyInfo of the log.
  // TODO(rsleevi): Convert this to array<uint8> when net::CTLogVerifier uses
  // base::span<>
  mojo_base.mojom.ByteString public_key;

  // The human-readable, log-supplied log name. Note that this will not be
  // translated.
  string name;

  // If set, the time since the Unix Epoch when the log was disqualified. This
  // is used to determine the "once or currently qualified" status of the log.
  // If the log is currently qualified, this will not be set.
  mojo_base.mojom.Time? disqualified_at;

  // Maximum merge delay. The log should not take longer than this to
  // incorporate a certificate.
  mojo_base.mojom.TimeDelta mmd;

  // Current operator for this log.
  string current_operator;

  // Information about previous operators for this log (if any).
  array<PreviousOperatorEntry> previous_operators;
};