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

Unified Diff: net/tools/cert_verify_tool/cert_verify_tool_util.cc

Issue 2305083002: Misc changes to cert_verify_tool for errors (Closed)
Patch Set: Created 4 years, 3 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
Index: net/tools/cert_verify_tool/cert_verify_tool_util.cc
diff --git a/net/tools/cert_verify_tool/cert_verify_tool_util.cc b/net/tools/cert_verify_tool/cert_verify_tool_util.cc
index 420a79d84ae7c3fff55afaffcb2cd6fe2a72b81a..055e911e9f9cd2c1258b5ea8e41731681b1efdf6 100644
--- a/net/tools/cert_verify_tool/cert_verify_tool_util.cc
+++ b/net/tools/cert_verify_tool/cert_verify_tool_util.cc
@@ -60,17 +60,21 @@ bool ReadCertificatesFromFile(const base::FilePath& file_path,
return true;
}
-void ReadChainFromFile(const base::FilePath& file_path,
+bool ReadChainFromFile(const base::FilePath& file_path,
CertInput* target,
std::vector<CertInput>* intermediates) {
std::vector<CertInput> tmp_certs;
if (!ReadCertificatesFromFile(file_path, &tmp_certs))
- return;
+ return false;
+
+ if (tmp_certs.empty())
+ return true;
eroman 2016/09/02 21:32:28 Considering this case success since the caller tes
*target = tmp_certs.front();
intermediates->insert(intermediates->end(), ++tmp_certs.begin(),
tmp_certs.end());
+ return true;
}
bool WriteToFile(const base::FilePath& file_path, const std::string& data) {

Powered by Google App Engine
This is Rietveld 408576698