Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: net/quic/crypto/proof_verifier_chromium.h

Issue 20047002: net: make QUIC ProofVerifier more generic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/crypto/proof_verifier_chromium.h
diff --git a/net/quic/crypto/proof_verifier_chromium.h b/net/quic/crypto/proof_verifier_chromium.h
index 134f62baa15c83d6a3dee395e97b2f51e918937b..bf17a1f154be60d8b08cc80210001be600d837dc 100644
--- a/net/quic/crypto/proof_verifier_chromium.h
+++ b/net/quic/crypto/proof_verifier_chromium.h
@@ -23,6 +23,13 @@ namespace net {
class CertVerifier;
class SingleRequestCertVerifier;
+// ProofVerifyDetailsChromium is the implementation-specific information that a
+// ProofVerifierChromium returns about a certificate verification.
+class ProofVerifyDetailsChromium : public ProofVerifyDetails {
+ public:
+ CertVerifyResult cert_verify_result;
Ryan Hamilton 2013/07/23 18:40:50 nit: the style guide prohibits public members in
agl 2013/07/23 21:04:57 Have made it a struct.
+};
+
// ProofVerifierChromium implements the QUIC ProofVerifier interface.
// TODO(rtenneti): Add support for multiple requests for one ProofVerifier.
class NET_EXPORT_PRIVATE ProofVerifierChromium : public ProofVerifier {
@@ -32,13 +39,13 @@ class NET_EXPORT_PRIVATE ProofVerifierChromium : public ProofVerifier {
virtual ~ProofVerifierChromium();
// ProofVerifier interface
- virtual int VerifyProof(const std::string& hostname,
- const std::string& server_config,
- const std::vector<std::string>& certs,
- const std::string& signature,
- std::string* error_details,
- CertVerifyResult* cert_verify_result,
- const CompletionCallback& callback) OVERRIDE;
+ virtual Status VerifyProof(const std::string& hostname,
+ const std::string& server_config,
+ const std::vector<std::string>& certs,
+ const std::string& signature,
+ std::string* error_details,
+ scoped_ptr<ProofVerifyDetails>* details,
+ ProofVerifierCallback* callback) OVERRIDE;
private:
enum State {
@@ -63,11 +70,9 @@ class NET_EXPORT_PRIVATE ProofVerifierChromium : public ProofVerifier {
// |hostname| specifies the hostname for which |certs| is a valid chain.
std::string hostname_;
- CompletionCallback callback_;
-
- // The result of certificate verification.
- CertVerifyResult* cert_verify_result_;
- std::string* error_details_;
+ scoped_ptr<ProofVerifierCallback> callback_;
+ ProofVerifyDetailsChromium* verify_details_;
Ryan Hamilton 2013/07/23 18:40:50 can you add a comment about the ownership of |veri
agl 2013/07/23 21:04:57 Have made it a scoped_ptr.
+ std::string error_details_;
Ryan Hamilton 2013/07/23 18:40:50 Just to confirm my understanding, when we switch t
agl 2013/07/23 21:04:57 Yes. There will need to be some outstanding state
Ryan Hamilton 2013/07/23 21:19:16 Thanks.
// X509Certificate from a chain of DER encoded certificates.
scoped_refptr<X509Certificate> cert_;

Powered by Google App Engine
This is Rietveld 408576698