Chromium Code Reviews| 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/test_root_certs.h" | 5 #include "net/cert/test_root_certs.h" |
| 6 | 6 |
| 7 #include <openssl/err.h> | 7 #include <openssl/err.h> |
| 8 #include <openssl/x509v3.h> | 8 #include <openssl/x509v3.h> |
| 9 | 9 |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 return; | 35 return; |
| 36 | 36 |
| 37 temporary_roots_.clear(); | 37 temporary_roots_.clear(); |
| 38 X509Certificate::ResetCertStore(); | 38 X509Certificate::ResetCertStore(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool TestRootCerts::IsEmpty() const { | 41 bool TestRootCerts::IsEmpty() const { |
| 42 return temporary_roots_.empty(); | 42 return temporary_roots_.empty(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool TestRootCerts::Contains(X509Certificate::OSCertHandle cert) const { | |
| 46 for (std::vector<scoped_refptr<X509Certificate> >::const_iterator it = | |
| 47 temporary_roots_.begin(); | |
| 48 it != temporary_roots_.end(); | |
| 49 ++it) { | |
|
Ryan Sleevi
2014/01/30 05:27:40
ditto on ++it
mattm
2014/02/04 05:31:21
Done.
| |
| 50 if (X509Certificate::IsSameOSCert(cert, (*it)->os_cert_handle())) | |
| 51 return true; | |
| 52 } | |
| 53 return false; | |
| 54 } | |
| 55 | |
| 45 TestRootCerts::~TestRootCerts() {} | 56 TestRootCerts::~TestRootCerts() {} |
| 46 | 57 |
| 47 void TestRootCerts::Init() {} | 58 void TestRootCerts::Init() {} |
| 48 | 59 |
| 49 } // namespace net | 60 } // namespace net |
| OLD | NEW |