| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/quic/crypto/proof_verifier_chromium.h" | 5 #include "net/quic/crypto/proof_verifier_chromium.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "net/base/test_data_directory.h" | 9 #include "net/base/test_data_directory.h" |
| 10 #include "net/cert/cert_status_flags.h" | 10 #include "net/cert/cert_status_flags.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // CertVerifier that will fail the test if it is ever called. | 29 // CertVerifier that will fail the test if it is ever called. |
| 30 class FailsTestCertVerifier : public CertVerifier { | 30 class FailsTestCertVerifier : public CertVerifier { |
| 31 public: | 31 public: |
| 32 FailsTestCertVerifier() {} | 32 FailsTestCertVerifier() {} |
| 33 ~FailsTestCertVerifier() override {} | 33 ~FailsTestCertVerifier() override {} |
| 34 | 34 |
| 35 // CertVerifier implementation | 35 // CertVerifier implementation |
| 36 int Verify(X509Certificate* cert, | 36 int Verify(const RequestParams& params, |
| 37 const std::string& hostname, | |
| 38 const std::string& ocsp_response, | |
| 39 int flags, | |
| 40 CRLSet* crl_set, | 37 CRLSet* crl_set, |
| 41 CertVerifyResult* verify_result, | 38 CertVerifyResult* verify_result, |
| 42 const CompletionCallback& callback, | 39 const CompletionCallback& callback, |
| 43 std::unique_ptr<CertVerifier::Request>* out_req, | 40 std::unique_ptr<Request>* out_req, |
| 44 const BoundNetLog& net_log) override { | 41 const BoundNetLog& net_log) override { |
| 45 ADD_FAILURE() << "CertVerifier::Verify() should not be called"; | 42 ADD_FAILURE() << "CertVerifier::Verify() should not be called"; |
| 46 return ERR_FAILED; | 43 return ERR_FAILED; |
| 47 } | 44 } |
| 48 }; | 45 }; |
| 49 | 46 |
| 50 // CTPolicyEnforcer that will fail the test if it is ever called. | 47 // CTPolicyEnforcer that will fail the test if it is ever called. |
| 51 class FailsTestCTPolicyEnforcer : public CTPolicyEnforcer { | 48 class FailsTestCTPolicyEnforcer : public CTPolicyEnforcer { |
| 52 public: | 49 public: |
| 53 FailsTestCTPolicyEnforcer() {} | 50 FailsTestCTPolicyEnforcer() {} |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 ASSERT_EQ(QUIC_SUCCESS, status); | 401 ASSERT_EQ(QUIC_SUCCESS, status); |
| 405 | 402 |
| 406 ASSERT_TRUE(details_.get()); | 403 ASSERT_TRUE(details_.get()); |
| 407 ProofVerifyDetailsChromium* verify_details = | 404 ProofVerifyDetailsChromium* verify_details = |
| 408 static_cast<ProofVerifyDetailsChromium*>(details_.get()); | 405 static_cast<ProofVerifyDetailsChromium*>(details_.get()); |
| 409 EXPECT_EQ(0u, verify_details->cert_verify_result.cert_status); | 406 EXPECT_EQ(0u, verify_details->cert_verify_result.cert_status); |
| 410 } | 407 } |
| 411 | 408 |
| 412 } // namespace test | 409 } // namespace test |
| 413 } // namespace net | 410 } // namespace net |
| OLD | NEW |