OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/cert_status_flags.h" | 5 #include "net/cert/cert_status_flags.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Unknown status. Give it the benefit of the doubt. | 81 // Unknown status. Give it the benefit of the doubt. |
82 if (cert_status & CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) | 82 if (cert_status & CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) |
83 return ERR_CERT_UNABLE_TO_CHECK_REVOCATION; | 83 return ERR_CERT_UNABLE_TO_CHECK_REVOCATION; |
84 if (cert_status & CERT_STATUS_NO_REVOCATION_MECHANISM) | 84 if (cert_status & CERT_STATUS_NO_REVOCATION_MECHANISM) |
85 return ERR_CERT_NO_REVOCATION_MECHANISM; | 85 return ERR_CERT_NO_REVOCATION_MECHANISM; |
86 | 86 |
87 NOTREACHED(); | 87 NOTREACHED(); |
88 return ERR_UNEXPECTED; | 88 return ERR_UNEXPECTED; |
89 } | 89 } |
90 | 90 |
| 91 bool DoesCertHaveSignedCertificateTimestamps(CertStatus cert_status) { |
| 92 return (cert_status & CERT_STATUS_HAS_GOOD_SCT) || |
| 93 (cert_status & CERT_STATUS_HAS_SCT_FROM_KNOWN_LOG); |
| 94 } |
| 95 |
| 96 bool DoesCertHaveVerifiedSignedCertificateTimestamps(CertStatus cert_status) { |
| 97 return (cert_status & CERT_STATUS_HAS_GOOD_SCT) && |
| 98 (cert_status & CERT_STATUS_HAS_SCT_FROM_KNOWN_LOG); |
| 99 } |
| 100 |
91 } // namespace net | 101 } // namespace net |
OLD | NEW |