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

Unified Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 20047002: net: make QUIC ProofVerifier more generic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Can't use a token called "ERROR" on Windows. 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
« net/quic/crypto/proof_test.cc ('K') | « net/quic/quic_crypto_client_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.cc
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index b8ad0bbb384aae19694afb582d156b371eeea686..982542519341a0fdd348a397b3f99750c538388b 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -24,16 +24,19 @@ namespace {
class RecordingProofVerifier : public net::ProofVerifier {
public:
// ProofVerifier interface.
- virtual int VerifyProof(const string& hostname,
- const string& server_config,
- const vector<string>& certs,
- const string& signature,
- string* error_details,
- net::CertVerifyResult* cert_verify_result,
- const net::CompletionCallback& callback) OVERRIDE {
+ virtual net::ProofVerifier::Status VerifyProof(
+ const string& hostname,
+ const string& server_config,
+ const vector<string>& certs,
+ const string& signature,
+ string* error_details,
+ scoped_ptr<net::ProofVerifyDetails>* details,
+ net::ProofVerifierCallback* callback) OVERRIDE {
+ delete callback;
+
common_name_.clear();
if (certs.empty()) {
- return net::ERR_FAILED;
+ return FAILURE;
}
// Convert certs to X509Certificate.
@@ -44,11 +47,11 @@ class RecordingProofVerifier : public net::ProofVerifier {
scoped_refptr<net::X509Certificate> cert =
net::X509Certificate::CreateFromDERCertChain(cert_pieces);
if (!cert.get()) {
- return net::ERR_FAILED;
+ return FAILURE;
}
common_name_ = cert->subject().GetDisplayName();
- return net::OK;
+ return SUCCESS;
}
const string& common_name() const { return common_name_; }
« net/quic/crypto/proof_test.cc ('K') | « net/quic/quic_crypto_client_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698