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( |