OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #include "net/cert/ct_sct_to_string.h" | 5 #include "net/cert/ct_sct_to_string.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 namespace ct { | 9 namespace ct { |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 case SignedCertificateTimestamp::SCT_ORIGIN_MAX: | 55 case SignedCertificateTimestamp::SCT_ORIGIN_MAX: |
56 NOTREACHED(); | 56 NOTREACHED(); |
57 } | 57 } |
58 return "Unknown"; | 58 return "Unknown"; |
59 } | 59 } |
60 | 60 |
61 const std::string StatusToString(SCTVerifyStatus status) { | 61 const std::string StatusToString(SCTVerifyStatus status) { |
62 switch (status) { | 62 switch (status) { |
63 case SCT_STATUS_LOG_UNKNOWN: | 63 case SCT_STATUS_LOG_UNKNOWN: |
64 return "From unknown log"; | 64 return "From unknown log"; |
65 case SCT_STATUS_INVALID: | |
66 return "Invalid"; | |
67 case SCT_STATUS_INVALID_SIGNATURE: | 65 case SCT_STATUS_INVALID_SIGNATURE: |
68 return "Invalid signature"; | 66 return "Invalid signature"; |
69 case SCT_STATUS_OK: | 67 case SCT_STATUS_OK: |
70 return "Verified"; | 68 return "Verified"; |
71 case SCT_STATUS_NONE: | 69 case SCT_STATUS_NONE: |
72 return "None"; | 70 return "None"; |
73 case SCT_STATUS_INVALID_TIMESTAMP: | 71 case SCT_STATUS_INVALID_TIMESTAMP: |
74 return "Invalid timestamp"; | 72 return "Invalid timestamp"; |
75 } | 73 } |
76 return "Unknown"; | 74 return "Unknown"; |
77 } | 75 } |
78 | 76 |
79 } // namespace ct | 77 } // namespace ct |
80 | 78 |
81 } // namespace net | 79 } // namespace net |
OLD | NEW |