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

Side by Side Diff: net/cert/cert_status_flags.cc

Issue 76443006: Certificate Transparency: Threading the CT verifier into the SSL client socket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing compilation on non-NSS platforms Created 7 years 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698