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

Unified Diff: chrome/browser/extensions/extension_creator.cc

Issue 20142007: Catch the sign zip error earlier to prevent invalid private key crash Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test case for packing extension with invalid private key. Created 7 years, 5 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 | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_creator.cc
diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc
index e344338297db7fc9c296e8a330f87a982b85ce45..cbcf078a5df5421d730bb363724d97e55edc89e6 100644
--- a/chrome/browser/extensions/extension_creator.cc
+++ b/chrome/browser/extensions/extension_creator.cc
@@ -228,7 +228,12 @@ bool ExtensionCreator::SignZip(const base::FilePath& zip_path,
}
zip_handle.Close();
- signature_creator->Final(signature);
+ if (!signature_creator->Final(signature)) {
+ error_message_ =
+ l10n_util::GetStringUTF8(IDS_EXTENSION_ERROR_WHILE_SIGNING);
+ return false;
+ }
+
return true;
}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698