Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/common/cast/cast_cert_validator.h" | 5 #include "extensions/common/cast/cast_cert_validator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 282 } | 282 } |
| 283 | 283 |
| 284 scoped_ptr<CertVerificationContext> CertVerificationContextImplForTest( | 284 scoped_ptr<CertVerificationContext> CertVerificationContextImplForTest( |
| 285 const base::StringPiece& spki) { | 285 const base::StringPiece& spki) { |
| 286 // Use a bogus CommonName, since this is just exposed for testing signature | 286 // Use a bogus CommonName, since this is just exposed for testing signature |
| 287 // verification by unittests. | 287 // verification by unittests. |
| 288 return make_scoped_ptr( | 288 return make_scoped_ptr( |
| 289 new CertVerificationContextImpl(net::der::Input(spki), "CommonName")); | 289 new CertVerificationContextImpl(net::der::Input(spki), "CommonName")); |
| 290 } | 290 } |
| 291 | 291 |
| 292 bool AddTrustAnchorForTest(const uint8_t* data, size_t length) { | |
| 293 return CastTrustStore::Get().AddTrustedCertificateWithoutCopying(data, | |
|
eroman
2016/04/22 05:58:54
If you are using the "*WithoutCopying()" flavor, p
ryanchung
2016/04/22 19:03:49
Done, I added the warning. The certificate data wi
| |
| 294 length); | |
| 295 } | |
| 296 | |
| 292 } // namespace cast_crypto | 297 } // namespace cast_crypto |
| 293 } // namespace api | 298 } // namespace api |
| 294 } // namespace extensions | 299 } // namespace extensions |
| OLD | NEW |