OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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. | |
4 | |
5 syntax = "proto2"; | |
6 | |
7 option optimize_for = LITE_RUNTIME; | |
8 | |
9 package net; | |
10 | |
11 message CertVerificationSHA1HashValue { | |
Ryan Sleevi
2016/04/16 00:36:15
SHA256
ramant (doing other things)
2016/04/21 16:41:54
Done.
| |
12 optional bytes data = 1; | |
13 }; | |
14 | |
15 message CertVerificationRequestParams { | |
16 required string hostname = 1; | |
17 required int32 flags = 2; | |
18 repeated CertVerificationSHA1HashValue hash_values = 3; | |
Ryan Sleevi
2016/04/16 00:36:15
Note: You don't have to store the full SHA-1/SHA-2
ramant (doing other things)
2016/04/21 16:41:54
Made this changes for certificates.
RequestParams
| |
19 // The time when verification started. | |
20 required int64 start_time = 4; | |
21 }; | |
22 | |
23 message CertVerificationResult { | |
24 // The certificate and chain that was constructed during verification. | |
25 // Note that the though the verified certificate will match the originally | |
26 // supplied certificate, the intermediate certificates stored within may | |
27 // be substantially different. In the event of a verification failure, this | |
Ryan Sleevi
2016/04/16 00:36:15
I'm not sure what you're trying to say about thing
ramant (doing other things)
2016/04/21 16:41:54
Done.
| |
28 // will contain the chain as supplied by the server. This may be NULL if | |
29 // running within the sandbox. | |
30 required string verified_cert = 1; | |
31 | |
32 // Bitmask of CERT_STATUS_* from net/cert/cert_status_flags.h. Note that | |
33 // these status flags apply to the certificate chain returned in | |
34 // |verified_cert|, rather than the originally supplied certificate | |
35 // chain. | |
36 required uint32 cert_status = 2; | |
37 | |
38 // Properties of the certificate chain. | |
39 required bool has_md2 = 3; | |
40 required bool has_md4 = 4; | |
41 required bool has_md5 = 5; | |
42 required bool has_sha1 = 6; | |
43 required bool has_sha1_leaf = 7; | |
44 | |
45 // If the certificate was successfully verified then this contains the | |
46 // hashes, in several hash algorithms, of the SubjectPublicKeyInfos of the | |
47 // chain. | |
48 repeated string public_key_hashes = 8; | |
49 // is_issued_by_known_root is true if we recognise the root CA as a standard | |
50 // root. If it isn't then it's probably the case that this certificate was | |
51 // generated by a MITM proxy whose root has been installed locally. This is | |
52 // meaningless if the certificate was not trusted. | |
53 required bool is_issued_by_known_root = 9; | |
54 | |
55 // is_issued_by_additional_trust_anchor is true if the root CA used for this | |
56 // verification came from the list of additional trust anchors. | |
57 required bool is_issued_by_additional_trust_anchor = 10; | |
58 | |
59 // True if a fallback to the common name was used when matching the host | |
60 // name, rather than using the subjectAltName. | |
61 required bool common_name_fallback_used = 11; | |
62 }; | |
63 | |
64 message CertVerificationCacheValidityPeriod { | |
65 required int64 verification_time = 1; | |
66 required int64 expiration_time = 2; | |
67 }; | |
68 | |
69 message CertVerificationCachedResult { | |
70 // The return value of CertVerifier::Verify. | |
71 required int64 error = 1; | |
72 // The output of CertVerifier::Verify. | |
73 required CertVerificationResult result = 2; | |
74 } | |
75 | |
76 message CertVerificationCacheEntry { | |
77 required CertVerificationRequestParams request_params = 1; | |
78 required CertVerificationCachedResult cached_result = 2; | |
79 required CertVerificationCacheValidityPeriod cache_validity_period = 3; | |
80 }; | |
81 | |
82 // CertVerification is serialized and persisted to disk. | |
83 message CertVerificationCache { | |
84 repeated CertVerificationCacheEntry cache_entry = 1; | |
85 }; | |
OLD | NEW |