1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This protobuffer is intended to store reports from Chrome users of
6 // certificate errors. A report will be sent from Chrome when it gets
7 // e.g. a certificate for google.com that chains up to a root CA not expected by
8 // Chrome for that origin, such as DigiNotar (compromised in July 2011), or
9 // other pinning errors such as a blacklisted cert in the chain, or
10 // (when opted in) other certificate validation errors like an expired
11 // cert. The report from the user will include the hostname being accessed,
12 // the full certificate chain (in PEM format), and the
13 // timestamp of when the client tried to access the site. A response is
14 // generated by the frontend and logged, including validation and error checking
15 // done on the client's input data.
19 // Chrome requires this.
20 option optimize_for = LITE_RUNTIME;
22 package certificate_reporting;
26 message CertLoggerInterstitialInfo {
27 // The different reasons that an SSL warning interstitial could be shown to
29 enum InterstitialReason {
30 UNKNOWN_INTERSTITIAL_REASON = 0;
31 // A standard SSL interstitial
33 // An interstitial alerting the user that they are in a captive portal
34 INTERSTITIAL_CAPTIVE_PORTAL = 2;
35 // An interstitial telling the user to update their system clock
36 INTERSTITIAL_CLOCK = 3;
39 // The type of interstitial that was shown
40 optional InterstitialReason interstitial_reason = 1;
41 // True if the user clicked through to the offending website
42 optional bool user_proceeded = 2;
43 // True if the user was shown an option to click through
44 optional bool overridable = 3;
47 message CertLoggerRequest {
48 // The hostname being accessed (required as the cert could be valid for
49 // multiple hosts, e.g. a wildcard or a SubjectAltName.
50 required string hostname = 1;
51 // The certificate chain as a series of PEM-encoded certificates, including
52 // intermediates but not necessarily the root.
53 required string cert_chain = 2;
54 // The time (in usec since the epoch) when the client attempted to access the
55 // site generating the pinning error.
56 required int64 time_usec = 3;
57 // public_key_hash contains the string forms of the hashes calculated for
58 // the chain. (I.e. "sha1/<base64 data>".)
59 repeated string public_key_hash = 4;
60 // pin contains the string forms of the pins that were matched against for
62 repeated string pin = 5;
65 UNKNOWN_CERT_ERROR = 0;
68 ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = 3;
69 ERR_CERT_AUTHORITY_INVALID = 4;
70 ERR_CERT_COMMON_NAME_INVALID = 5;
71 ERR_CERT_NAME_CONSTRAINT_VIOLATION = 6;
72 ERR_CERT_WEAK_SIGNATURE_ALGORITHM = 7;
73 ERR_CERT_WEAK_KEY = 8;
74 ERR_CERT_DATE_INVALID = 9;
75 ERR_CERT_VALIDITY_TOO_LONG = 10;
76 ERR_CERT_UNABLE_TO_CHECK_REVOCATION = 11;
77 ERR_CERT_NO_REVOCATION_MECHANISM = 12;
78 ERR_CERT_NON_UNIQUE_NAME = 13;
81 // Certificate errors encountered (if any) when validating this
83 repeated CertError cert_error = 6;
85 // Information about the interstitial that was shown to the user for
86 // this certificate error.
87 optional CertLoggerInterstitialInfo interstitial_info = 7;
89 // The unverified certificate chain as received by the client, as a
90 // series of PEM-encoded certificates. Can be different than
91 // |cert_chain|, which is the chain the client built during
93 optional string unverified_cert_chain = 8;