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

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

Issue 2289363004: Add error information to VerifySignedData(). (Closed)
Patch Set: rebase onto origin/master 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 | « components/cast_certificate/cast_crl.cc ('k') | net/cert/internal/signature_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/signature_policy.h
diff --git a/net/cert/internal/signature_policy.h b/net/cert/internal/signature_policy.h
index 749862377d80e4deb38085b2df711828bdaa937a..86d6c32b19f938523dfbc77f385d1235045adac8 100644
--- a/net/cert/internal/signature_policy.h
+++ b/net/cert/internal/signature_policy.h
@@ -13,6 +13,7 @@
namespace net {
+class CertErrors;
class SignatureAlgorithm;
// SignaturePolicy is an interface (and base implementation) for applying
@@ -28,21 +29,23 @@ class NET_EXPORT SignaturePolicy {
//
// The default implementation accepts all signature algorithms.
virtual bool IsAcceptableSignatureAlgorithm(
- const SignatureAlgorithm& algorithm) const;
+ const SignatureAlgorithm& algorithm,
+ CertErrors* errors) const;
// Implementations should return true if |curve_nid| is an allowed
// elliptical curve. |curve_nid| is an object ID from BoringSSL (for example
// NID_secp384r1).
//
// The default implementation accepts secp256r1, secp384r1, secp521r1 only.
- virtual bool IsAcceptableCurveForEcdsa(int curve_nid) const;
+ virtual bool IsAcceptableCurveForEcdsa(int curve_nid,
+ CertErrors* errors) const;
// Implementations should return true if |modulus_length_bits| is an allowed
// RSA key size in bits.
//
// The default implementation accepts any modulus length >= 2048 bits.
- virtual bool IsAcceptableModulusLengthForRsa(
- size_t modulus_length_bits) const;
+ virtual bool IsAcceptableModulusLengthForRsa(size_t modulus_length_bits,
+ CertErrors* errors) const;
};
// SimpleSignaturePolicy modifies the base SignaturePolicy by allowing the
@@ -51,8 +54,8 @@ class NET_EXPORT SimpleSignaturePolicy : public SignaturePolicy {
public:
explicit SimpleSignaturePolicy(size_t min_rsa_modulus_length_bits);
- bool IsAcceptableModulusLengthForRsa(
- size_t modulus_length_bits) const override;
+ bool IsAcceptableModulusLengthForRsa(size_t modulus_length_bits,
+ CertErrors* errors) const override;
private:
const size_t min_rsa_modulus_length_bits_;
« no previous file with comments | « components/cast_certificate/cast_crl.cc ('k') | net/cert/internal/signature_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698