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

Side by Side Diff: net/tools/cert_verify_tool/cert_verify_tool_util.h

Issue 2305083002: Misc changes to cert_verify_tool for errors (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TOOLS_CERT_VERIFY_TOOL_CERT_VERIFY_TOOL_UTIL_H_ 5 #ifndef NET_TOOLS_CERT_VERIFY_TOOL_CERT_VERIFY_TOOL_UTIL_H_
6 #define NET_TOOLS_CERT_VERIFY_TOOL_CERT_VERIFY_TOOL_UTIL_H_ 6 #define NET_TOOLS_CERT_VERIFY_TOOL_CERT_VERIFY_TOOL_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 // this might indicate which part of the file |der_cert| came from. 25 // this might indicate which part of the file |der_cert| came from.
26 std::string source_details; 26 std::string source_details;
27 }; 27 };
28 28
29 // Parses |file_path| as a single DER cert or a PEM certificate list. 29 // Parses |file_path| as a single DER cert or a PEM certificate list.
30 bool ReadCertificatesFromFile(const base::FilePath& file_path, 30 bool ReadCertificatesFromFile(const base::FilePath& file_path,
31 std::vector<CertInput>* certs); 31 std::vector<CertInput>* certs);
32 32
33 // Parses |file_path| as a DER cert or PEM chain. If more than one cert is 33 // Parses |file_path| as a DER cert or PEM chain. If more than one cert is
34 // present, the first will be used as the target certificate and the rest will 34 // present, the first will be used as the target certificate and the rest will
35 // be used as intermediates. 35 // be used as intermediates. Returns true on success. Note if the input
36 void ReadChainFromFile(const base::FilePath& file_path, 36 // contains no certificates then the return value is true however
37 // nothing is written to |target| or |intermediates.
mattm 2016/09/06 22:10:50 missing |
eroman 2016/09/06 22:32:56 Done.
38 bool ReadChainFromFile(const base::FilePath& file_path,
37 CertInput* target, 39 CertInput* target,
38 std::vector<CertInput>* intermediates); 40 std::vector<CertInput>* intermediates);
39 41
40 // Writes a file and prints an error message if it failed. 42 // Writes a file and prints an error message if it failed.
41 bool WriteToFile(const base::FilePath& file_path, const std::string& data); 43 bool WriteToFile(const base::FilePath& file_path, const std::string& data);
42 44
43 // Prints an error about the input |cert|. This will include the file the cert 45 // Prints an error about the input |cert|. This will include the file the cert
44 // was read from, as well as which block in the file if it was a PEM file. 46 // was read from, as well as which block in the file if it was a PEM file.
45 void PrintCertError(const std::string& error, const CertInput& cert); 47 void PrintCertError(const std::string& error, const CertInput& cert);
46 48
47 #endif // NET_TOOLS_CERT_VERIFY_TOOL_CERT_VERIFY_TOOL_UTIL_H_ 49 #endif // NET_TOOLS_CERT_VERIFY_TOOL_CERT_VERIFY_TOOL_UTIL_H_
OLDNEW
« no previous file with comments | « net/tools/cert_verify_tool/cert_verify_tool.cc ('k') | net/tools/cert_verify_tool/cert_verify_tool_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698