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

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

Issue 1259313002: Add some policy controls for VerifySignedData(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_python
Patch Set: Address more comments Created 5 years, 4 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/signature_policy.cc ('k') | net/cert/internal/verify_signed_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/verify_signed_data.h
diff --git a/net/cert/internal/verify_signed_data.h b/net/cert/internal/verify_signed_data.h
index 1ac763319daf61097fda4417fe65c996b65a3372..97c150dffba27c887d830f764c69d57d0581e98a 100644
--- a/net/cert/internal/verify_signed_data.h
+++ b/net/cert/internal/verify_signed_data.h
@@ -16,6 +16,7 @@ class Input;
} // namespace der
class SignatureAlgorithm;
+class SignaturePolicy;
// Verifies that |signature_value| is a valid signature of |signed_data| using
// the algorithm |signature_algorithm| and the public key |public_key|.
@@ -24,12 +25,18 @@ class SignatureAlgorithm;
// |signed_data| - The blob of data to verify
// |signature_value| - The BIT STRING for the signature's value
// |public_key| - A DER-encoded SubjectPublicKeyInfo.
+// |policy| - Instance of the policy to use. This will be queried to
+// determine if:
+// * The parsed RSA key is an adequate size.
+// * The parsed EC key is for an allowed curve.
+// * The signature algorithm and its parameters are acceptable.
//
// Returns true if verification was successful.
NET_EXPORT bool VerifySignedData(const SignatureAlgorithm& signature_algorithm,
const der::Input& signed_data,
const der::BitString& signature_value,
- const der::Input& public_key)
+ const der::Input& public_key,
+ const SignaturePolicy* policy)
WARN_UNUSED_RESULT;
} // namespace net
« no previous file with comments | « net/cert/internal/signature_policy.cc ('k') | net/cert/internal/verify_signed_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698