OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |