Chromium Code Reviews| Index: remoting/protocol/jingle_session_manager.cc |
| diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc |
| index 1ca26bde8cbdbdcc1654a04d43b9df3d821f59cc..6b8eb42547c0ee290693a29de2837aef1e0dfcb4 100644 |
| --- a/remoting/protocol/jingle_session_manager.cc |
| +++ b/remoting/protocol/jingle_session_manager.cc |
| @@ -2,10 +2,13 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include <limits> |
| + |
| #include "remoting/protocol/jingle_session_manager.h" |
|
wtc
2011/01/20 01:33:05
Nit: the Style Guide recommends that this header b
|
| #include "base/base64.h" |
| #include "base/message_loop.h" |
| +#include "base/rand_util.h" |
| #include "base/string_number_conversions.h" |
| #include "remoting/base/constants.h" |
| #include "remoting/jingle_glue/jingle_thread.h" |
| @@ -282,7 +285,8 @@ void JingleSessionManager::OnSessionCreate( |
| if (!certificate_) { |
| private_key_.reset(base::RSAPrivateKey::Create(1024)); |
| certificate_ = net::X509Certificate::CreateSelfSigned( |
| - private_key_.get(), "CN=chromoting", 1, |
| + private_key_.get(), "CN=chromoting", |
| + base::RandInt(1, std::numeric_limits<int>::max()), |
|
wtc
2011/01/20 01:33:05
This is correct. But it uses only half of the pos
|
| base::TimeDelta::FromDays(1)); |
| CHECK(certificate_); |
| } |