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

Unified Diff: net/cert/cert_verify_proc_win.cc

Issue 2610903003: [refactor] Extract the CertVerifyResult assignment of has_md2, has_md4, (Closed)
Patch Set: address comments Created 3 years, 11 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/cert_verify_proc_openssl.cc ('k') | net/cert/x509_certificate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_win.cc
diff --git a/net/cert/cert_verify_proc_win.cc b/net/cert/cert_verify_proc_win.cc
index a13117a7a8e2e8ce399b108197bd5d1b7edc3531..416d78c17041cf7d8800b378b92e2d36f141ef0e 100644
--- a/net/cert/cert_verify_proc_win.cc
+++ b/net/cert/cert_verify_proc_win.cc
@@ -364,26 +364,7 @@ void GetCertChainInfo(PCCERT_CHAIN_CONTEXT chain_context,
verified_chain.push_back(cert);
}
- const char* algorithm = cert->pCertInfo->SignatureAlgorithm.pszObjId;
- if (strcmp(algorithm, szOID_RSA_MD5RSA) == 0) {
- // md5WithRSAEncryption: 1.2.840.113549.1.1.4
- verify_result->has_md5 = true;
- } else if (strcmp(algorithm, szOID_RSA_MD2RSA) == 0) {
- // md2WithRSAEncryption: 1.2.840.113549.1.1.2
- verify_result->has_md2 = true;
- } else if (strcmp(algorithm, szOID_RSA_MD4RSA) == 0) {
- // md4WithRSAEncryption: 1.2.840.113549.1.1.3
- verify_result->has_md4 = true;
- } else if (strcmp(algorithm, szOID_RSA_SHA1RSA) == 0 ||
- strcmp(algorithm, szOID_X957_SHA1DSA) == 0 ||
- strcmp(algorithm, szOID_ECDSA_SHA1) == 0) {
- // sha1WithRSAEncryption: 1.2.840.113549.1.1.5
- // id-dsa-with-sha1: 1.2.840.10040.4.3
- // ecdsa-with-SHA1: 1.2.840.10045.4.1
- verify_result->has_sha1 = true;
- if (i == 0)
- verify_result->has_sha1_leaf = true;
- }
+ FillCertVerifyResultWeakSignature(cert, i == 0, verify_result);
}
if (verified_cert) {
« no previous file with comments | « net/cert/cert_verify_proc_openssl.cc ('k') | net/cert/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698