Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: remoting/protocol/jingle_session_manager.cc

Issue 6649005: Fix handling of invalid certificates in JingleSessionManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session_manager.cc
diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc
index 88c196972b12804e62cf2cb475f198f2c801870f..22ec73367aa5e87525ee05078e3d3585e7f8655f 100644
--- a/remoting/protocol/jingle_session_manager.cc
+++ b/remoting/protocol/jingle_session_manager.cc
@@ -444,7 +444,10 @@ bool JingleSessionManager::ParseContent(
std::string base64_cert = child->BodyText();
std::string der_cert;
bool ret = base::Base64Decode(base64_cert, &der_cert);
- DCHECK(ret) << "Failed to decode certificate";
+ if (!ret) {
+ LOG(ERROR) << "Failed to decode certificate received from the peer.";
+ return false;
+ }
certificate = net::X509Certificate::CreateFromBytes(der_cert.data(),
der_cert.length());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698