Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 CHECK(ssl_ctx->Init( | 49 CHECK(ssl_ctx->Init( |
| 50 nullptr /* cert_loader */, NO_AUTHENTICATE_PEER, &config)); | 50 nullptr /* cert_loader */, NO_AUTHENTICATE_PEER, &config)); |
| 51 | 51 |
| 52 return new gfe_quic::ProofSourceGoogle3([=]() { return ssl_ctx; }); | 52 return new gfe_quic::ProofSourceGoogle3([=]() { return ssl_ctx; }); |
| 53 } | 53 } |
| 54 ======= | 54 ======= |
| 55 CHECK(ssl_ctx->Init(NO_AUTHENTICATE_PEER, &config)); | 55 CHECK(ssl_ctx->Init(NO_AUTHENTICATE_PEER, &config)); |
| 56 | 56 |
| 57 return new gfe_quic::ProofSourceGoogle3([=]() { return ssl_ctx; }); | 57 return new gfe_quic::ProofSourceGoogle3([=]() { return ssl_ctx; }); |
| 58 } | 58 } |
| 59 <<<<<<< | |
| 59 >>>>>>> | 60 >>>>>>> |
| 60 ======= | 61 ======= |
| 61 SSLContext* ssl_ctx = new SSLContext( | 62 SSLContext* ssl_ctx = new SSLContext( |
| 63 ||||||| | |
| 64 config.set_issuing_certificates_file(intermediate_cert_name); | |
| 65 config.add_cert()->set_name(leaf_cert_name); | |
| 66 | |
| 67 SSLContext* ssl_ctx = new SSLContext( | |
| 68 ======= | |
| 69 config.set_issuing_certificates_file(intermediate_cert_name); | |
| 70 config.add_cert()->set_name(leaf_cert_name); | |
| 71 | |
| 72 auto ssl_ctx = std::make_shared<SSLContext>( | |
| 73 >>>>>>> | |
|
Ryan Hamilton
2015/11/22 00:55:32
I think something has gone sideways...
ianswett
2015/11/23 20:05:19
Done.
| |
| 62 SSLContext::SSL_SERVER_CONTEXT_SSL_V23, | 74 SSLContext::SSL_SERVER_CONTEXT_SSL_V23, |
| 63 SSL_SESS_CACHE_SERVER | SSL_SESS_CACHE_NO_INTERNAL_STORE); | 75 SSL_SESS_CACHE_SERVER | SSL_SESS_CACHE_NO_INTERNAL_STORE); |
| 64 CHECK(ssl_ctx->Init(NO_AUTHENTICATE_PEER, &config)); | 76 CHECK(ssl_ctx->Init(NO_AUTHENTICATE_PEER, &config)); |
| 65 >>>>>>> | 77 >>>>>>> |
| 66 | 78 |
| 67 return new gfe_quic::ProofSourceGoogle3([=]() { return ssl_ctx; }); | 79 return new gfe_quic::ProofSourceGoogle3([=]() { return ssl_ctx; }); |
| 68 >>>>>>> | 80 >>>>>>> |
| 69 } | 81 } |
| 70 | 82 |
| 71 int main(int argc, char *argv[]) { | 83 int main(int argc, char *argv[]) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 | 140 |
| 129 int rc = server.Listen(net::IPEndPoint(ip, FLAGS_port)); | 141 int rc = server.Listen(net::IPEndPoint(ip, FLAGS_port)); |
| 130 if (rc < 0) { | 142 if (rc < 0) { |
| 131 return 1; | 143 return 1; |
| 132 } | 144 } |
| 133 | 145 |
| 134 while (1) { | 146 while (1) { |
| 135 server.WaitForEvents(); | 147 server.WaitForEvents(); |
| 136 } | 148 } |
| 137 } | 149 } |
| OLD | NEW |