diff options
author | ricea@chromium.org <ricea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-10 11:55:10 +0000 |
---|---|---|
committer | ricea@chromium.org <ricea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-10 11:55:10 +0000 |
commit | 0553072d237ad2b977e948591de3f87eee536a9c (patch) | |
tree | 58b462d22b2342db07c041ac8abaf061e671d1e5 /remoting/protocol/v2_authenticator.cc | |
parent | 9377d2ad77c6d7ee0190c90544eaed0ff0c7fc9c (diff) | |
download | chromium_src-0553072d237ad2b977e948591de3f87eee536a9c.zip chromium_src-0553072d237ad2b977e948591de3f87eee536a9c.tar.gz chromium_src-0553072d237ad2b977e948591de3f87eee536a9c.tar.bz2 |
The comment in base64.h implies that base::Base64Encode() can return false, but
this cannot happen in practice. Fix the comment.
The implementation of Base64Encode() attempts to check for the return value
MODP_B64_ERROR as a failure, but modp_b64_encode() cannot return this
value. Remove the check.
Remove unneeded integer cast.
Change the return type to void.
BUG=323357
TEST=base_unittests, compile all
TBR=jochen@chromium.org,miket@chromium.org,joi@chromium.org,akalin@chromium.org,sergeyu@chromium.org
Review URL: https://codereview.chromium.org/86913002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239759 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/v2_authenticator.cc')
-rw-r--r-- | remoting/protocol/v2_authenticator.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/remoting/protocol/v2_authenticator.cc b/remoting/protocol/v2_authenticator.cc index 80f7af3..ee5c9d1 100644 --- a/remoting/protocol/v2_authenticator.cc +++ b/remoting/protocol/v2_authenticator.cc @@ -156,10 +156,7 @@ scoped_ptr<buzz::XmlElement> V2Authenticator::GetNextMessage() { while (!pending_messages_.empty()) { const std::string& spake_message = pending_messages_.front(); std::string base64_message; - if (!base::Base64Encode(spake_message, &base64_message)) { - LOG(DFATAL) << "Cannot perform base64 encode on certificate"; - continue; - } + base::Base64Encode(spake_message, &base64_message); buzz::XmlElement* eke_tag = new buzz::XmlElement(kEkeTag); eke_tag->SetBodyText(base64_message); @@ -171,9 +168,7 @@ scoped_ptr<buzz::XmlElement> V2Authenticator::GetNextMessage() { if (!local_cert_.empty() && !certificate_sent_) { buzz::XmlElement* certificate_tag = new buzz::XmlElement(kCertificateTag); std::string base64_cert; - if (!base::Base64Encode(local_cert_, &base64_cert)) { - LOG(DFATAL) << "Cannot perform base64 encode on certificate"; - } + base::Base64Encode(local_cert_, &base64_cert); certificate_tag->SetBodyText(base64_cert); message->AddElement(certificate_tag); certificate_sent_ = true; |