summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_host_info.proto
blob: d74a872941c4c531b7cacf300494f5482ef5ffda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2010 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 net;

// SSLHostInfoProto contains information which we store about a given HTTPS
// server.
message SSLHostInfoProto {
  // The certificate chain, as returned by the server, as a series of DER
  // encoded X.509 certificates.
  repeated bytes certificate_der = 1;
  // The contents of the server's ServerHello message. Needed in order to
  // predict its response in the case of Snap Start.
  optional bytes server_hello = 2;

  // This is a mirror of SSLClientSocket::NextProtoStatus. We use this in order
  // to be robust against changes to that enum, which isn't required to be
  // stable across versions. See the comments there for details.
  enum NextProtoStatus {
    UNSUPPORTED = 0;
    NEGOTIATED = 1;
    NO_OVERLAP = 2;
  }

  // When doing Snap Start, we also need to know what protocol we expect the
  // server to negotiate.
  optional NextProtoStatus npn_status = 3;
  optional bytes npn_protocol = 4;
};