diff options
Diffstat (limited to 'remoting/host/host_key_pair.cc')
-rw-r--r-- | remoting/host/host_key_pair.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/remoting/host/host_key_pair.cc b/remoting/host/host_key_pair.cc index 576bc1b..4f81aa8 100644 --- a/remoting/host/host_key_pair.cc +++ b/remoting/host/host_key_pair.cc @@ -100,9 +100,11 @@ std::string HostKeyPair::GenerateCertificate() const { key_.get(), "CN=chromoting", base::RandInt(1, std::numeric_limits<int>::max()), base::TimeDelta::FromDays(1)); - std::string result; - CHECK(cert->GetDEREncoded(&result)); - return result; + std::string encoded; + bool result = net::X509Certificate::GetDEREncoded(cert->os_cert_handle(), + &encoded); + CHECK(result); + return encoded; } } // namespace remoting |