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

Unified Diff: extensions/browser/api/cast_channel/cast_auth_ica.cc

Issue 687733004: Implement crypto signature verification routines using OpenSSL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix const truncation warning (raised by Win builds.) Created 6 years, 1 month 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 | « extensions/BUILD.gn ('k') | extensions/browser/api/cast_channel/cast_auth_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/cast_channel/cast_auth_ica.cc
diff --git a/extensions/browser/api/cast_channel/cast_auth_ica.cc b/extensions/browser/api/cast_channel/cast_auth_ica.cc
index ac97edca135c3d2db082c855f4362effc5be2b1a..0b570df14ae48dda92e24d4d143ab7b17022f367 100644
--- a/extensions/browser/api/cast_channel/cast_auth_ica.cc
+++ b/extensions/browser/api/cast_channel/cast_auth_ica.cc
@@ -686,6 +686,10 @@ base::StringPiece GetTrustedICAPublicKey(const base::StringPiece& data) {
AuthorityKeyStore& authority_keys_store = g_authority_keys_store.Get();
scoped_refptr<net::X509Certificate> ica_cert =
net::X509Certificate::CreateFromBytes(data.data(), data.size());
+ if (!ica_cert.get()) {
+ LOG(ERROR) << "Invalid ICA certificate.";
+ return "";
+ }
return authority_keys_store.GetICAPublicKeyFromFingerprint(
net::X509Certificate::CalculateFingerprint256(
ica_cert->os_cert_handle()));
« no previous file with comments | « extensions/BUILD.gn ('k') | extensions/browser/api/cast_channel/cast_auth_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698