Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: net/cert/sct_status_flags.h

Issue 2294373002: Certificate Transparency: Remove the obsolete invalid sct status. (Closed)
Patch Set: Addressing review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/cert/ct_sct_to_string.cc ('k') | net/cert/sct_status_flags.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_CERT_SCT_STATUS_FLAGS_H_ 5 #ifndef NET_CERT_SCT_STATUS_FLAGS_H_
6 #define NET_CERT_SCT_STATUS_FLAGS_H_ 6 #define NET_CERT_SCT_STATUS_FLAGS_H_
7 7
8 #include "net/base/net_export.h"
Ryan Sleevi 2016/09/01 21:29:46 #include <stdint> #include "net/base/net_export.h
Eran Messeri 2016/09/09 09:38:14 Done.
9
8 namespace net { 10 namespace net {
9 11
10 namespace ct { 12 namespace ct {
11 13
12 // The possible verification statuses for a SignedCertificateTimestamp. 14 // The possible verification statuses for a SignedCertificateTimestamp.
13 // Note: The numeric values are used within histograms and should not change 15 // Note: The numeric values are used within histograms and should not change
14 // or be re-assigned. 16 // or be re-assigned.
15 enum SCTVerifyStatus { 17 enum SCTVerifyStatus {
16 // Not a real status, this just prevents a default int value from being 18 // Not a real status, this just prevents a default int value from being
17 // mis-interpreseted as a valid status. 19 // mis-interpreseted as a valid status.
18 // Also used to count SCTs that cannot be decoded in the histogram. 20 // Also used to count SCTs that cannot be decoded in the histogram.
19 SCT_STATUS_NONE = 0, 21 SCT_STATUS_NONE = 0,
20 22
21 // The SCT is from an unknown log, so we cannot verify its signature. 23 // The SCT is from an unknown log, so we cannot verify its signature.
22 SCT_STATUS_LOG_UNKNOWN = 1, 24 SCT_STATUS_LOG_UNKNOWN = 1,
23 25
24 // This value is deprecated and should not be used. It has been split 26 // Obsolete. Kept here to avoid reuse.
25 // into INVALID_SIGNATURE and INVALID_TIMESTAMP to represent the 27 // SCT_STATUS_INVALID = 2,
26 // different reasons an SCT could be invalid. Though it is no longer
27 // in use, it is preserved here because it may be present in
28 // serialized messages.
29 SCT_STATUS_INVALID = 2,
30 28
31 // The SCT is from a known log, and the signature is valid. 29 // The SCT is from a known log, and the signature is valid.
32 SCT_STATUS_OK = 3, 30 SCT_STATUS_OK = 3,
33 31
34 // The SCT is from a known log, but the signature is invalid. 32 // The SCT is from a known log, but the signature is invalid.
35 SCT_STATUS_INVALID_SIGNATURE = 4, 33 SCT_STATUS_INVALID_SIGNATURE = 4,
36 34
37 // The SCT is from a known log, but the timestamp is in the future. 35 // The SCT is from a known log, but the timestamp is in the future.
38 SCT_STATUS_INVALID_TIMESTAMP = 5, 36 SCT_STATUS_INVALID_TIMESTAMP = 5,
39 37
40 // Used to bound the enum values. Since this enum is passed over IPC, 38 // Used to bound the enum values. Since this enum is passed over IPC,
41 // the last value must be a valid one (rather than one past a valid one). 39 // the last value must be a valid one (rather than one past a valid one).
42 SCT_STATUS_MAX = SCT_STATUS_INVALID_TIMESTAMP, 40 SCT_STATUS_MAX = SCT_STATUS_INVALID_TIMESTAMP,
43 }; 41 };
44 42
43 // Returns true if |status| denotes a valid value in SCTVerifyStatus, which
44 // is all current values in the enum except SCT_STATUS_NONE.
45 NET_EXPORT bool IsValidSCTStatus(uint32_t status);
Ryan Sleevi 2016/09/01 21:29:46 STYLE: https://google.github.io/styleguide/cppgui
Eran Messeri 2016/09/09 09:38:14 Done, used the 2nd option.
46
45 } // namespace ct 47 } // namespace ct
46 48
47 } // namespace net 49 } // namespace net
48 50
49 #endif // NET_CERT_SCT_STATUS_FLAGS_H_ 51 #endif // NET_CERT_SCT_STATUS_FLAGS_H_
OLDNEW
« no previous file with comments | « net/cert/ct_sct_to_string.cc ('k') | net/cert/sct_status_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698