diff options
Diffstat (limited to 'remoting/protocol/v2_authenticator.cc')
-rw-r--r-- | remoting/protocol/v2_authenticator.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/remoting/protocol/v2_authenticator.cc b/remoting/protocol/v2_authenticator.cc index ee5c9d1..80f7af3 100644 --- a/remoting/protocol/v2_authenticator.cc +++ b/remoting/protocol/v2_authenticator.cc @@ -156,7 +156,10 @@ scoped_ptr<buzz::XmlElement> V2Authenticator::GetNextMessage() { while (!pending_messages_.empty()) { const std::string& spake_message = pending_messages_.front(); std::string base64_message; - base::Base64Encode(spake_message, &base64_message); + if (!base::Base64Encode(spake_message, &base64_message)) { + LOG(DFATAL) << "Cannot perform base64 encode on certificate"; + continue; + } buzz::XmlElement* eke_tag = new buzz::XmlElement(kEkeTag); eke_tag->SetBodyText(base64_message); @@ -168,7 +171,9 @@ scoped_ptr<buzz::XmlElement> V2Authenticator::GetNextMessage() { if (!local_cert_.empty() && !certificate_sent_) { buzz::XmlElement* certificate_tag = new buzz::XmlElement(kCertificateTag); std::string base64_cert; - base::Base64Encode(local_cert_, &base64_cert); + if (!base::Base64Encode(local_cert_, &base64_cert)) { + LOG(DFATAL) << "Cannot perform base64 encode on certificate"; + } certificate_tag->SetBodyText(base64_cert); message->AddElement(certificate_tag); certificate_sent_ = true; |