| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_verifier.h" | 5 #include "net/cert/cert_verifier.h" |
| 6 | 6 |
| 7 #include <openssl/sha.h> | 7 #include <openssl/sha.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 SHA256_Final(reinterpret_cast<uint8_t*>( | 57 SHA256_Final(reinterpret_cast<uint8_t*>( |
| 58 base::WriteInto(&key_, SHA256_DIGEST_LENGTH + 1)), | 58 base::WriteInto(&key_, SHA256_DIGEST_LENGTH + 1)), |
| 59 &ctx); | 59 &ctx); |
| 60 } | 60 } |
| 61 | 61 |
| 62 CertVerifier::RequestParams::RequestParams(const RequestParams& other) = | 62 CertVerifier::RequestParams::RequestParams(const RequestParams& other) = |
| 63 default; | 63 default; |
| 64 CertVerifier::RequestParams::~RequestParams() {} | 64 CertVerifier::RequestParams::~RequestParams() {} |
| 65 | 65 |
| 66 bool CertVerifier::RequestParams::operator==( |
| 67 const CertVerifier::RequestParams& other) const { |
| 68 return key_ == other.key_; |
| 69 } |
| 70 |
| 66 bool CertVerifier::RequestParams::operator<( | 71 bool CertVerifier::RequestParams::operator<( |
| 67 const CertVerifier::RequestParams& other) const { | 72 const CertVerifier::RequestParams& other) const { |
| 68 return key_ < other.key_; | 73 return key_ < other.key_; |
| 69 } | 74 } |
| 70 | 75 |
| 71 bool CertVerifier::SupportsOCSPStapling() { | 76 bool CertVerifier::SupportsOCSPStapling() { |
| 72 return false; | 77 return false; |
| 73 } | 78 } |
| 74 | 79 |
| 75 std::unique_ptr<CertVerifier> CertVerifier::CreateDefault() { | 80 std::unique_ptr<CertVerifier> CertVerifier::CreateDefault() { |
| 76 #if defined(OS_NACL) | 81 #if defined(OS_NACL) |
| 77 NOTIMPLEMENTED(); | 82 NOTIMPLEMENTED(); |
| 78 return std::unique_ptr<CertVerifier>(); | 83 return std::unique_ptr<CertVerifier>(); |
| 79 #else | 84 #else |
| 80 return base::MakeUnique<CachingCertVerifier>( | 85 return base::MakeUnique<CachingCertVerifier>( |
| 81 base::MakeUnique<MultiThreadedCertVerifier>( | 86 base::MakeUnique<MultiThreadedCertVerifier>( |
| 82 CertVerifyProc::CreateDefault())); | 87 CertVerifyProc::CreateDefault())); |
| 83 #endif | 88 #endif |
| 84 } | 89 } |
| 85 | 90 |
| 86 } // namespace net | 91 } // namespace net |
| OLD | NEW |