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

Side by Side Diff: net/cert/cert_verify_proc_mac.cc

Issue 509273002: Detect SHA-1 when it appears in certificate chains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_status_extended
Patch Set: Correct Android comment Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « net/cert/cert_verify_proc_android.cc ('k') | net/cert/cert_verify_proc_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/cert_verify_proc_mac.h" 5 #include "net/cert/cert_verify_proc_mac.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <CoreServices/CoreServices.h> 8 #include <CoreServices/CoreServices.h>
9 #include <Security/Security.h> 9 #include <Security/Security.h>
10 10
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 if (!sig_algorithm) 220 if (!sig_algorithm)
221 continue; 221 continue;
222 222
223 const CSSM_OID* alg_oid = &sig_algorithm->algorithm; 223 const CSSM_OID* alg_oid = &sig_algorithm->algorithm;
224 if (CSSMOIDEqual(alg_oid, &CSSMOID_MD2WithRSA)) { 224 if (CSSMOIDEqual(alg_oid, &CSSMOID_MD2WithRSA)) {
225 verify_result->has_md2 = true; 225 verify_result->has_md2 = true;
226 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_MD4WithRSA)) { 226 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_MD4WithRSA)) {
227 verify_result->has_md4 = true; 227 verify_result->has_md4 = true;
228 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_MD5WithRSA)) { 228 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_MD5WithRSA)) {
229 verify_result->has_md5 = true; 229 verify_result->has_md5 = true;
230 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithRSA) ||
231 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithRSA_OIW) ||
232 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA) ||
233 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA_CMS) ||
234 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA_JDK) ||
235 CSSMOIDEqual(alg_oid, &CSSMOID_ECDSA_WithSHA1)) {
236 verify_result->has_sha1 = true;
230 } 237 }
231 } 238 }
232 if (!verified_cert) 239 if (!verified_cert)
233 return; 240 return;
234 241
235 verify_result->verified_cert = 242 verify_result->verified_cert =
236 X509Certificate::CreateFromHandle(verified_cert, verified_chain); 243 X509Certificate::CreateFromHandle(verified_cert, verified_chain);
237 } 244 }
238 245
239 void AppendPublicKeyHashes(CFArrayRef chain, 246 void AppendPublicKeyHashes(CFArrayRef chain,
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 } 730 }
724 } 731 }
725 } 732 }
726 } 733 }
727 } 734 }
728 735
729 return OK; 736 return OK;
730 } 737 }
731 738
732 } // namespace net 739 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_android.cc ('k') | net/cert/cert_verify_proc_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698