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

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

Issue 2728953003: Add support for MD2, MD4, and MD5 to SignatureAlgorithm. (Closed)
Patch Set: wow. dumb Created 3 years, 9 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/x509_util_openssl.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.cc
diff --git a/net/cert/internal/verify_signed_data.cc b/net/cert/internal/verify_signed_data.cc
index 8fd045b2a91dedc13878b7ab9071e2241664667e..28c8b7d273527555ae87aa3b6ed0842f06369cd7 100644
--- a/net/cert/internal/verify_signed_data.cc
+++ b/net/cert/internal/verify_signed_data.cc
@@ -40,6 +40,11 @@ WARN_UNUSED_RESULT bool GetDigest(DigestAlgorithm digest, const EVP_MD** out) {
*out = nullptr;
switch (digest) {
+ case DigestAlgorithm::Md2:
+ case DigestAlgorithm::Md4:
+ case DigestAlgorithm::Md5:
+ // Unsupported.
+ break;
case DigestAlgorithm::Sha1:
*out = EVP_sha1();
break;
@@ -292,6 +297,7 @@ bool VerifySignedData(const SignatureAlgorithm& signature_algorithm,
const SignaturePolicy* policy,
CertErrors* errors) {
if (!policy->IsAcceptableSignatureAlgorithm(signature_algorithm, errors)) {
+ // TODO(crbug.com/634443): Include the DER for the AlgorithmIdentifier
errors->AddError(kUnacceptableSignatureAlgorithm);
return false;
}
« no previous file with comments | « net/cert/internal/signature_policy.cc ('k') | net/cert/x509_util_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698