1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_
6 #define NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "net/base/net_export.h"
16 #include "net/base/net_log.h"
17 #include "net/cert/cert_verify_result.h"
18 #include "net/cert/x509_certificate.h"
19 #include "net/quic/crypto/proof_verifier.h"
25 // ProofVerifyDetailsChromium is the implementation-specific information that a
26 // ProofVerifierChromium returns about a certificate verification.
27 struct ProofVerifyDetailsChromium
: public ProofVerifyDetails
{
29 CertVerifyResult cert_verify_result
;
32 // ProofVerifyContextChromium is the implementation-specific information that a
33 // ProofVerifierChromium needs in order to log correctly.
34 struct ProofVerifyContextChromium
: public ProofVerifyContext
{
36 explicit ProofVerifyContextChromium(const BoundNetLog
& net_log
)
42 // ProofVerifierChromium implements the QUIC ProofVerifier interface. It is
43 // capable of handling multiple simultaneous requests.
44 class NET_EXPORT_PRIVATE ProofVerifierChromium
: public ProofVerifier
{
46 explicit ProofVerifierChromium(CertVerifier
* cert_verifier
);
47 virtual ~ProofVerifierChromium();
49 // ProofVerifier interface
50 virtual QuicAsyncStatus
VerifyProof(
51 const std::string
& hostname
,
52 const std::string
& server_config
,
53 const std::vector
<std::string
>& certs
,
54 const std::string
& signature
,
55 const ProofVerifyContext
* verify_context
,
56 std::string
* error_details
,
57 scoped_ptr
<ProofVerifyDetails
>* verify_details
,
58 ProofVerifierCallback
* callback
) OVERRIDE
;
62 typedef std::set
<Job
*> JobSet
;
64 void OnJobComplete(Job
* job
);
66 // Set owning pointers to active jobs.
69 // Underlying verifier used to verify certificates.
70 CertVerifier
* const cert_verifier_
;
72 DISALLOW_COPY_AND_ASSIGN(ProofVerifierChromium
);
77 #endif // NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_