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

Unified Diff: net/tools/quic/quic_client_bin.cc

Issue 192583004: QUIC - use QuicSessionKey tuple (host, port, is_https) instead of server_hostname (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with TOT Created 6 years, 9 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/tools/quic/quic_client_bin.cc
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc
index 49cfdef44d50ac9fcdea56fa48f9d8753d07ea51..36ad5b744b1f9e894e303e388d9de9454e92b660 100644
--- a/net/tools/quic/quic_client_bin.cc
+++ b/net/tools/quic/quic_client_bin.cc
@@ -4,6 +4,7 @@
// A binary wrapper for QuicClient. Connects to --hostname via --address
// on --port and requests URLs specified on the command line.
+// --secure to check the certificates using proof verifier .
//
// For example:
// quic_client --address=127.0.0.1 --port=6122 --hostname=www.google.com
@@ -22,6 +23,7 @@
int32 FLAGS_port = 6121;
std::string FLAGS_address = "127.0.0.1";
std::string FLAGS_hostname = "localhost";
+bool FLAGS_secure = false;
int main(int argc, char *argv[]) {
CommandLine::Init(argc, argv);
@@ -39,7 +41,8 @@ int main(int argc, char *argv[]) {
"-h, --help show this help message and exit\n"
"--port=<port> specify the port to connect to\n"
"--address=<address> specify the IP address to connect to\n"
- "--host=<host> specify the SNI hostname to use\n";
+ "--host=<host> specify the SNI hostname to use\n"
+ "--secure check certificates\n";
std::cout << help_str;
exit(0);
}
@@ -55,9 +58,13 @@ int main(int argc, char *argv[]) {
if (line->HasSwitch("hostname")) {
FLAGS_hostname = line->GetSwitchValueASCII("hostname");
}
+ if (line->HasSwitch("secure")) {
+ FLAGS_secure = true;
+ }
VLOG(1) << "server port: " << FLAGS_port
<< " address: " << FLAGS_address
- << " hostname: " << FLAGS_hostname;
+ << " hostname: " << FLAGS_hostname
+ << " secure: " << FLAGS_secure;
base::AtExitManager exit_manager;
@@ -65,7 +72,8 @@ int main(int argc, char *argv[]) {
CHECK(net::ParseIPLiteralToNumber(FLAGS_address, &addr));
// TODO(rjshade): Set version on command line.
net::tools::QuicClient client(
- net::IPEndPoint(addr, FLAGS_port), FLAGS_hostname,
+ net::IPEndPoint(addr, FLAGS_port),
+ net::QuicSessionKey(FLAGS_hostname, FLAGS_port, FLAGS_secure),
net::QuicSupportedVersions(), true);
client.Initialize();

Powered by Google App Engine
This is Rietveld 408576698