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

Side by Side Diff: net/tools/quic/quic_server_bin.cc

Issue 1463603002: QUIC proof source: allow construction with an |SSLContext| provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107505890
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // A binary wrapper for QuicServer. It listens forever on --port 5 // A binary wrapper for QuicServer. It listens forever on --port
6 // (default 6121) until it's killed or ctrl-cd to death. 6 // (default 6121) until it's killed or ctrl-cd to death.
7 7
8 #include <iostream> 8 #include <iostream>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "net/base/ip_endpoint.h" 16 #include "net/base/ip_endpoint.h"
17 #include "net/quic/crypto/proof_source_chromium.h" 17 #include "net/quic/crypto/proof_source_chromium.h"
18 #include "net/quic/quic_protocol.h" 18 #include "net/quic/quic_protocol.h"
19 #include "net/tools/quic/quic_in_memory_cache.h" 19 #include "net/tools/quic/quic_in_memory_cache.h"
20 #include "net/tools/quic/quic_server.h" 20 #include "net/tools/quic/quic_server.h"
21 21
22 // The port the quic server will listen on. 22 // The port the quic server will listen on.
23 int32 FLAGS_port = 6121; 23 int32 FLAGS_port = 6121;
24 24
25 net::ProofSource* CreateProofSource(const base::FilePath& cert_path, 25 net::ProofSource* CreateProofSource(const base::FilePath& cert_path,
26 const base::FilePath& key_path) { 26 const base::FilePath& key_path) {
27 net::ProofSourceChromium* proof_source = new net::ProofSourceChromium(); 27 net::ProofSourceChromium* proof_source = new net::ProofSourceChromium();
28 <<<<<<<
28 CHECK(proof_source->Initialize(cert_path, key_path, base::FilePath())); 29 CHECK(proof_source->Initialize(cert_path, key_path, base::FilePath()));
29 return proof_source; 30 return proof_source;
31 |||||||
32 CHECK(ssl_ctx->Init(
33 nullptr /* cert_loader */, NO_AUTHENTICATE_PEER, &config));
34
35 return new gfe_quic::ProofSourceGoogle3(ssl_ctx,
36 /*take_ownership_of_ssl_ctx=*/true);
37 =======
38 CHECK(ssl_ctx->Init(
39 nullptr /* cert_loader */, NO_AUTHENTICATE_PEER, &config));
40
41 return new gfe_quic::ProofSourceGoogle3([=]() { return ssl_ctx; });
42 >>>>>>>
Ryan Hamilton 2015/11/19 20:14:15 Merge conflict?
ianswett 2015/11/23 19:11:14 Done.
30 } 43 }
31 44
32 int main(int argc, char *argv[]) { 45 int main(int argc, char *argv[]) {
33 base::AtExitManager exit_manager; 46 base::AtExitManager exit_manager;
34 base::MessageLoopForIO message_loop; 47 base::MessageLoopForIO message_loop;
35 48
36 base::CommandLine::Init(argc, argv); 49 base::CommandLine::Init(argc, argv);
37 base::CommandLine* line = base::CommandLine::ForCurrentProcess(); 50 base::CommandLine* line = base::CommandLine::ForCurrentProcess();
38 51
39 logging::LoggingSettings settings; 52 logging::LoggingSettings settings;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 102
90 int rc = server.Listen(net::IPEndPoint(ip, FLAGS_port)); 103 int rc = server.Listen(net::IPEndPoint(ip, FLAGS_port));
91 if (rc < 0) { 104 if (rc < 0) {
92 return 1; 105 return 1;
93 } 106 }
94 107
95 while (1) { 108 while (1) {
96 server.WaitForEvents(); 109 server.WaitForEvents();
97 } 110 }
98 } 111 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698