| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 public: | 42 public: |
| 43 // ProofVerifier interface. | 43 // ProofVerifier interface. |
| 44 virtual QuicAsyncStatus VerifyProof( | 44 virtual QuicAsyncStatus VerifyProof( |
| 45 const string& hostname, | 45 const string& hostname, |
| 46 const string& server_config, | 46 const string& server_config, |
| 47 const vector<string>& certs, | 47 const vector<string>& certs, |
| 48 const string& signature, | 48 const string& signature, |
| 49 const ProofVerifyContext* context, | 49 const ProofVerifyContext* context, |
| 50 string* error_details, | 50 string* error_details, |
| 51 scoped_ptr<ProofVerifyDetails>* details, | 51 scoped_ptr<ProofVerifyDetails>* details, |
| 52 ProofVerifierCallback* callback) OVERRIDE { | 52 ProofVerifierCallback* callback) override { |
| 53 common_name_.clear(); | 53 common_name_.clear(); |
| 54 if (certs.empty()) { | 54 if (certs.empty()) { |
| 55 return QUIC_FAILURE; | 55 return QUIC_FAILURE; |
| 56 } | 56 } |
| 57 | 57 |
| 58 // Convert certs to X509Certificate. | 58 // Convert certs to X509Certificate. |
| 59 vector<StringPiece> cert_pieces(certs.size()); | 59 vector<StringPiece> cert_pieces(certs.size()); |
| 60 for (unsigned i = 0; i < certs.size(); i++) { | 60 for (unsigned i = 0; i < certs.size(); i++) { |
| 61 cert_pieces[i] = StringPiece(certs[i]); | 61 cert_pieces[i] = StringPiece(certs[i]); |
| 62 } | 62 } |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 // Set policy for headers and crypto streams. | 560 // Set policy for headers and crypto streams. |
| 561 ReliableQuicStreamPeer::SetFecPolicy( | 561 ReliableQuicStreamPeer::SetFecPolicy( |
| 562 QuicSessionPeer::GetHeadersStream(client()->session()), fec_policy); | 562 QuicSessionPeer::GetHeadersStream(client()->session()), fec_policy); |
| 563 ReliableQuicStreamPeer::SetFecPolicy(client()->session()->GetCryptoStream(), | 563 ReliableQuicStreamPeer::SetFecPolicy(client()->session()->GetCryptoStream(), |
| 564 fec_policy); | 564 fec_policy); |
| 565 } | 565 } |
| 566 | 566 |
| 567 } // namespace test | 567 } // namespace test |
| 568 } // namespace tools | 568 } // namespace tools |
| 569 } // namespace net | 569 } // namespace net |
| OLD | NEW |