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

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package quic;

// QuicServerConfigProtobuf contains QUIC server config block and the private
// keys needed to prove ownership.
message QuicServerConfigProtobuf {
  // config is a serialised config in QUIC wire format.
  required bytes config = 1;

  // PrivateKey contains a QUIC tag of a key exchange algorithm and a
  // serialised private key for that algorithm. The format of the serialised
  // private key is specific to the algorithm in question.
  message PrivateKey {
    required uint32 tag = 1;
    required string private_key = 2;
  }
  repeated PrivateKey key = 2;

  // primary_time contains a UNIX epoch seconds value that indicates when this
  // config should become primary.
  optional int64 primary_time = 3;

  // Relative priority of this config vs other configs with the same
  // primary time.  For use as a secondary sort key when selecting the
  // primary config.
  optional uint64 priority = 4;
};
