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

Unified Diff: net/cert/internal/signature_algorithm.h

Issue 2349093002: Change the interface for parsing SignatureAlgorithm to take a (Closed)
Patch Set: add comment 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
« no previous file with comments | « net/cert/internal/parsed_certificate.cc ('k') | net/cert/internal/signature_algorithm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/signature_algorithm.h
diff --git a/net/cert/internal/signature_algorithm.h b/net/cert/internal/signature_algorithm.h
index 0942cce8354e010204580659ae3ef42213c39f0a..a184c41d1e3dd5d8ddd522a079e56e7f3262defc 100644
--- a/net/cert/internal/signature_algorithm.h
+++ b/net/cert/internal/signature_algorithm.h
@@ -15,6 +15,8 @@
namespace net {
+class CertErrors;
+
namespace der {
class Input;
} // namespace der
@@ -87,11 +89,14 @@ class NET_EXPORT SignatureAlgorithm {
DigestAlgorithm digest() const { return digest_; }
// Creates a SignatureAlgorithm by parsing a DER-encoded "AlgorithmIdentifier"
- // (RFC 5280). Returns nullptr on failure.
- static std::unique_ptr<SignatureAlgorithm> CreateFromDer(
- const der::Input& algorithm_identifier);
+ // (RFC 5280). Returns nullptr on failure. If |errors| was non-null then
+ // error/warning information is output to it.
+ static std::unique_ptr<SignatureAlgorithm> Create(
eroman 2016/09/17 01:18:18 I dropped the "FromDer" from name for consistency
+ const der::Input& algorithm_identifier,
+ CertErrors* errors);
// Creates a new SignatureAlgorithm with the given type and parameters.
+ // Guaranteed to return non-null result.
static std::unique_ptr<SignatureAlgorithm> CreateRsaPkcs1(
DigestAlgorithm digest);
static std::unique_ptr<SignatureAlgorithm> CreateEcdsa(
« no previous file with comments | « net/cert/internal/parsed_certificate.cc ('k') | net/cert/internal/signature_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698