| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // CertVerifier that will fail the test if it is ever called. | 34 // CertVerifier that will fail the test if it is ever called. |
| 35 class FailsTestCertVerifier : public CertVerifier { | 35 class FailsTestCertVerifier : public CertVerifier { |
| 36 public: | 36 public: |
| 37 FailsTestCertVerifier() {} | 37 FailsTestCertVerifier() {} |
| 38 ~FailsTestCertVerifier() override {} | 38 ~FailsTestCertVerifier() override {} |
| 39 | 39 |
| 40 // CertVerifier implementation | 40 // CertVerifier implementation |
| 41 int Verify(X509Certificate* cert, | 41 int Verify(const CertVerifier::RequestParams& params, |
| 42 const std::string& hostname, | |
| 43 const std::string& ocsp_response, | |
| 44 int flags, | |
| 45 CRLSet* crl_set, | 42 CRLSet* crl_set, |
| 46 CertVerifyResult* verify_result, | 43 CertVerifyResult* verify_result, |
| 47 const CompletionCallback& callback, | 44 const CompletionCallback& callback, |
| 48 std::unique_ptr<CertVerifier::Request>* out_req, | 45 std::unique_ptr<CertVerifier::Request>* out_req, |
| 49 const BoundNetLog& net_log) override { | 46 const BoundNetLog& net_log) override { |
| 50 ADD_FAILURE() << "CertVerifier::Verify() should not be called"; | 47 ADD_FAILURE() << "CertVerifier::Verify() should not be called"; |
| 51 return ERR_FAILED; | 48 return ERR_FAILED; |
| 52 } | 49 } |
| 53 }; | 50 }; |
| 54 | 51 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 ASSERT_EQ(QUIC_SUCCESS, status); | 406 ASSERT_EQ(QUIC_SUCCESS, status); |
| 410 | 407 |
| 411 ASSERT_TRUE(details_.get()); | 408 ASSERT_TRUE(details_.get()); |
| 412 ProofVerifyDetailsChromium* verify_details = | 409 ProofVerifyDetailsChromium* verify_details = |
| 413 static_cast<ProofVerifyDetailsChromium*>(details_.get()); | 410 static_cast<ProofVerifyDetailsChromium*>(details_.get()); |
| 414 EXPECT_EQ(0u, verify_details->cert_verify_result.cert_status); | 411 EXPECT_EQ(0u, verify_details->cert_verify_result.cert_status); |
| 415 } | 412 } |
| 416 | 413 |
| 417 } // namespace test | 414 } // namespace test |
| 418 } // namespace net | 415 } // namespace net |
| OLD | NEW |