| 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/tools/quic/test_tools/quic_test_client.h" | 5 #include "net/tools/quic/test_tools/quic_test_client.h" |
| 6 | 6 |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "net/base/completion_callback.h" | 8 #include "net/base/completion_callback.h" |
| 9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "net/cert/cert_verify_result.h" | 10 #include "net/cert/cert_verify_result.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 namespace net { | 36 namespace net { |
| 37 namespace test { | 37 namespace test { |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // RecordingProofVerifier accepts any certificate chain and records the common | 40 // RecordingProofVerifier accepts any certificate chain and records the common |
| 41 // name of the leaf. | 41 // name of the leaf. |
| 42 class RecordingProofVerifier : public ProofVerifier { | 42 class RecordingProofVerifier : public ProofVerifier { |
| 43 public: | 43 public: |
| 44 // ProofVerifier interface. | 44 // ProofVerifier interface. |
| 45 QuicAsyncStatus VerifyProof(const string& hostname, | 45 QuicAsyncStatus VerifyProof(const string& hostname, |
| 46 const uint16_t port, |
| 46 const string& server_config, | 47 const string& server_config, |
| 47 const vector<string>& certs, | 48 const vector<string>& certs, |
| 48 const string& cert_sct, | 49 const string& cert_sct, |
| 49 const string& signature, | 50 const string& signature, |
| 50 const ProofVerifyContext* context, | 51 const ProofVerifyContext* context, |
| 51 string* error_details, | 52 string* error_details, |
| 52 scoped_ptr<ProofVerifyDetails>* details, | 53 scoped_ptr<ProofVerifyDetails>* details, |
| 53 ProofVerifierCallback* callback) override { | 54 ProofVerifierCallback* callback) override { |
| 54 common_name_.clear(); | 55 common_name_.clear(); |
| 55 if (certs.empty()) { | 56 if (certs.empty()) { |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 CHECK(message); | 675 CHECK(message); |
| 675 message->headers()->SetRequestVersion( | 676 message->headers()->SetRequestVersion( |
| 676 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); | 677 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); |
| 677 message->headers()->SetRequestMethod( | 678 message->headers()->SetRequestMethod( |
| 678 HTTPMessage::MethodToString(HttpConstants::GET)); | 679 HTTPMessage::MethodToString(HttpConstants::GET)); |
| 679 message->headers()->SetRequestUri(uri); | 680 message->headers()->SetRequestUri(uri); |
| 680 } | 681 } |
| 681 | 682 |
| 682 } // namespace test | 683 } // namespace test |
| 683 } // namespace net | 684 } // namespace net |
| OLD | NEW |