| 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 26 matching lines...) Expand all Loading... |
| 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 string& server_config, | 46 const string& server_config, |
| 47 QuicVersion quic_version, |
| 48 StringPiece chlo_hash, |
| 47 const vector<string>& certs, | 49 const vector<string>& certs, |
| 48 const string& cert_sct, | 50 const string& cert_sct, |
| 49 const string& signature, | 51 const string& signature, |
| 50 const ProofVerifyContext* context, | 52 const ProofVerifyContext* context, |
| 51 string* error_details, | 53 string* error_details, |
| 52 scoped_ptr<ProofVerifyDetails>* details, | 54 scoped_ptr<ProofVerifyDetails>* details, |
| 53 ProofVerifierCallback* callback) override { | 55 ProofVerifierCallback* callback) override { |
| 54 common_name_.clear(); | 56 common_name_.clear(); |
| 55 if (certs.empty()) { | 57 if (certs.empty()) { |
| 56 return QUIC_FAILURE; | 58 return QUIC_FAILURE; |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 CHECK(message); | 676 CHECK(message); |
| 675 message->headers()->SetRequestVersion( | 677 message->headers()->SetRequestVersion( |
| 676 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); | 678 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); |
| 677 message->headers()->SetRequestMethod( | 679 message->headers()->SetRequestMethod( |
| 678 HTTPMessage::MethodToString(HttpConstants::GET)); | 680 HTTPMessage::MethodToString(HttpConstants::GET)); |
| 679 message->headers()->SetRequestUri(uri); | 681 message->headers()->SetRequestUri(uri); |
| 680 } | 682 } |
| 681 | 683 |
| 682 } // namespace test | 684 } // namespace test |
| 683 } // namespace net | 685 } // namespace net |
| OLD | NEW |