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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 (flags & CertVerifier::VERIFY_REV_CHECKING_ENABLED), | 168 (flags & CertVerifier::VERIFY_REV_CHECKING_ENABLED), |
169 (flags & CertVerifier::VERIFY_REV_CHECKING_ENABLED_EV_ONLY), | 169 (flags & CertVerifier::VERIFY_REV_CHECKING_ENABLED_EV_ONLY), |
170 local_policies); | 170 local_policies); |
171 if (status) | 171 if (status) |
172 return status; | 172 return status; |
173 | 173 |
174 policies->reset(local_policies.release()); | 174 policies->reset(local_policies.release()); |
175 return noErr; | 175 return noErr; |
176 } | 176 } |
177 | 177 |
178 // Saves some information about the certificate chain |cert_chain| in | 178 // Stores the constructed certificate chain |cert_chain| and information about |
179 // |*verify_result|. The caller MUST initialize |*verify_result| before | 179 // the signature algorithms used into |*verify_result|. If the leaf cert in |
180 // calling this function. | 180 // |cert_chain| contains a weak (MD2, MD4, MD5, SHA-1) signature, stores that |
181 // in |*leaf_is_weak|. | |
181 void GetCertChainInfo(CFArrayRef cert_chain, | 182 void GetCertChainInfo(CFArrayRef cert_chain, |
182 CSSM_TP_APPLE_EVIDENCE_INFO* chain_info, | 183 CSSM_TP_APPLE_EVIDENCE_INFO* chain_info, |
183 CertVerifyResult* verify_result) { | 184 CertVerifyResult* verify_result, |
185 bool* leaf_is_weak) { | |
Ryan Sleevi
2015/01/31 02:23:03
This is just so I can shortcircuit the loop below.
davidben
2015/02/02 22:13:55
("This" is referring to leaf_is_week and not the r
Ryan Sleevi
2015/02/02 22:36:00
Right, sorry. Yes, adding leaf is weak was to make
| |
186 *leaf_is_weak = false; | |
187 verify_result->verified_cert = nullptr; | |
188 verify_result->has_md2 = false; | |
189 verify_result->has_md4 = false; | |
190 verify_result->has_md5 = false; | |
191 verify_result->has_sha1 = false; | |
192 | |
184 SecCertificateRef verified_cert = NULL; | 193 SecCertificateRef verified_cert = NULL; |
185 std::vector<SecCertificateRef> verified_chain; | 194 std::vector<SecCertificateRef> verified_chain; |
186 for (CFIndex i = 0, count = CFArrayGetCount(cert_chain); i < count; ++i) { | 195 for (CFIndex i = 0, count = CFArrayGetCount(cert_chain); i < count; ++i) { |
187 SecCertificateRef chain_cert = reinterpret_cast<SecCertificateRef>( | 196 SecCertificateRef chain_cert = reinterpret_cast<SecCertificateRef>( |
188 const_cast<void*>(CFArrayGetValueAtIndex(cert_chain, i))); | 197 const_cast<void*>(CFArrayGetValueAtIndex(cert_chain, i))); |
189 if (i == 0) { | 198 if (i == 0) { |
190 verified_cert = chain_cert; | 199 verified_cert = chain_cert; |
191 } else { | 200 } else { |
192 verified_chain.push_back(chain_cert); | 201 verified_chain.push_back(chain_cert); |
193 } | 202 } |
(...skipping 22 matching lines...) Expand all Loading... | |
216 // OS X certificate library, but based on history, it is best to play it | 225 // OS X certificate library, but based on history, it is best to play it |
217 // safe. | 226 // safe. |
218 const CSSM_X509_ALGORITHM_IDENTIFIER* sig_algorithm = | 227 const CSSM_X509_ALGORITHM_IDENTIFIER* sig_algorithm = |
219 signature_field.GetAs<CSSM_X509_ALGORITHM_IDENTIFIER>(); | 228 signature_field.GetAs<CSSM_X509_ALGORITHM_IDENTIFIER>(); |
220 if (!sig_algorithm) | 229 if (!sig_algorithm) |
221 continue; | 230 continue; |
222 | 231 |
223 const CSSM_OID* alg_oid = &sig_algorithm->algorithm; | 232 const CSSM_OID* alg_oid = &sig_algorithm->algorithm; |
224 if (CSSMOIDEqual(alg_oid, &CSSMOID_MD2WithRSA)) { | 233 if (CSSMOIDEqual(alg_oid, &CSSMOID_MD2WithRSA)) { |
225 verify_result->has_md2 = true; | 234 verify_result->has_md2 = true; |
235 if (i == 0) | |
236 *leaf_is_weak = true; | |
226 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_MD4WithRSA)) { | 237 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_MD4WithRSA)) { |
227 verify_result->has_md4 = true; | 238 verify_result->has_md4 = true; |
239 if (i == 0) | |
240 *leaf_is_weak = true; | |
228 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_MD5WithRSA)) { | 241 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_MD5WithRSA)) { |
229 verify_result->has_md5 = true; | 242 verify_result->has_md5 = true; |
243 if (i == 0) | |
244 *leaf_is_weak = true; | |
230 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithRSA) || | 245 } else if (CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithRSA) || |
231 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithRSA_OIW) || | 246 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithRSA_OIW) || |
232 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA) || | 247 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA) || |
233 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA_CMS) || | 248 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA_CMS) || |
234 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA_JDK) || | 249 CSSMOIDEqual(alg_oid, &CSSMOID_SHA1WithDSA_JDK) || |
235 CSSMOIDEqual(alg_oid, &CSSMOID_ECDSA_WithSHA1)) { | 250 CSSMOIDEqual(alg_oid, &CSSMOID_ECDSA_WithSHA1)) { |
236 verify_result->has_sha1 = true; | 251 verify_result->has_sha1 = true; |
252 if (i == 0) | |
253 *leaf_is_weak = true; | |
237 } | 254 } |
238 } | 255 } |
239 if (!verified_cert) | 256 if (!verified_cert) |
240 return; | 257 return; |
241 | 258 |
242 verify_result->verified_cert = | 259 verify_result->verified_cert = |
243 X509Certificate::CreateFromHandle(verified_cert, verified_chain); | 260 X509Certificate::CreateFromHandle(verified_cert, verified_chain); |
244 } | 261 } |
245 | 262 |
246 void AppendPublicKeyHashes(CFArrayRef chain, | 263 void AppendPublicKeyHashes(CFArrayRef chain, |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 return NetErrorFromOSStatus(status); | 456 return NetErrorFromOSStatus(status); |
440 | 457 |
441 trust_ref->swap(scoped_tmp_trust); | 458 trust_ref->swap(scoped_tmp_trust); |
442 *trust_result = tmp_trust_result; | 459 *trust_result = tmp_trust_result; |
443 verified_chain->reset(tmp_verified_chain); | 460 verified_chain->reset(tmp_verified_chain); |
444 *chain_info = tmp_chain_info; | 461 *chain_info = tmp_chain_info; |
445 | 462 |
446 return OK; | 463 return OK; |
447 } | 464 } |
448 | 465 |
449 // OS X ships with both "GTE CyberTrust Global Root" and "Baltimore CyberTrust | |
450 // Root" as part of its trusted root store. However, a cross-certified version | |
451 // of the "Baltimore CyberTrust Root" exists that chains to "GTE CyberTrust | |
452 // Global Root". When OS X/Security.framework attempts to evaluate such a | |
453 // certificate chain, it disregards the "Baltimore CyberTrust Root" that exists | |
454 // within Keychain and instead attempts to terminate the chain in the "GTE | |
455 // CyberTrust Global Root". However, the GTE root is scheduled to be removed in | |
456 // a future OS X update (for sunsetting purposes), and once removed, such | |
457 // chains will fail validation, even though a trust anchor still exists. | |
458 // | |
459 // Rather than over-generalizing a solution that may mask a number of TLS | |
460 // misconfigurations, attempt to specifically match the affected | |
461 // cross-certified certificate and remove it from certificate chain processing. | |
Ryan Sleevi
2015/01/31 02:23:03
Sadly, overgeneralizing is the "right" answer here
| |
462 bool IsBadBaltimoreGTECertificate(SecCertificateRef cert) { | |
463 // Matches the GTE-signed Baltimore CyberTrust Root | |
464 // https://cacert.omniroot.com/Baltimore-to-GTE-04-12.pem | |
465 static const SHA1HashValue kBadBaltimoreHashNew = | |
466 { { 0x4D, 0x34, 0xEA, 0x92, 0x76, 0x4B, 0x3A, 0x31, 0x49, 0x11, | |
467 0x99, 0x52, 0xF4, 0x19, 0x30, 0xCA, 0x11, 0x34, 0x83, 0x61 } }; | |
468 // Matches the legacy GTE-signed Baltimore CyberTrust Root | |
469 // https://cacert.omniroot.com/gte-2-2025.pem | |
470 static const SHA1HashValue kBadBaltimoreHashOld = | |
471 { { 0x54, 0xD8, 0xCB, 0x49, 0x1F, 0xA1, 0x6D, 0xF8, 0x87, 0xDC, | |
472 0x94, 0xA9, 0x34, 0xCC, 0x83, 0x6B, 0xDA, 0xA8, 0xA3, 0x69 } }; | |
473 | |
474 SHA1HashValue fingerprint = X509Certificate::CalculateFingerprint(cert); | |
475 | |
476 return fingerprint.Equals(kBadBaltimoreHashNew) || | |
477 fingerprint.Equals(kBadBaltimoreHashOld); | |
478 } | |
479 | |
480 // Attempts to re-verify |cert_array| after adjusting the inputs to work around | |
481 // known issues in OS X. To be used if BuildAndEvaluateSecTrustRef fails to | |
482 // return a positive result for verification. | |
483 // | |
484 // This function should only be called while the Mac Security Services lock is | |
485 // held. | |
486 void RetrySecTrustEvaluateWithAdjustedChain( | |
487 CFArrayRef cert_array, | |
488 CFArrayRef trust_policies, | |
489 int flags, | |
490 ScopedCFTypeRef<SecTrustRef>* trust_ref, | |
491 SecTrustResultType* trust_result, | |
492 ScopedCFTypeRef<CFArrayRef>* verified_chain, | |
493 CSSM_TP_APPLE_EVIDENCE_INFO** chain_info) { | |
494 CFIndex count = CFArrayGetCount(*verified_chain); | |
495 CFIndex slice_point = 0; | |
496 | |
497 for (CFIndex i = 1; i < count; ++i) { | |
498 SecCertificateRef cert = reinterpret_cast<SecCertificateRef>( | |
499 const_cast<void*>(CFArrayGetValueAtIndex(*verified_chain, i))); | |
500 if (cert == NULL) | |
501 return; // Strange times; can't fix things up. | |
502 | |
503 if (IsBadBaltimoreGTECertificate(cert)) { | |
504 slice_point = i; | |
505 break; | |
506 } | |
507 } | |
508 if (slice_point == 0) | |
509 return; // Nothing to do. | |
510 | |
511 ScopedCFTypeRef<CFMutableArrayRef> adjusted_cert_array( | |
512 CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks)); | |
513 // Note: This excludes the certificate at |slice_point|. | |
514 CFArrayAppendArray(adjusted_cert_array, cert_array, | |
515 CFRangeMake(0, slice_point)); | |
516 | |
517 // Ignore the result; failure will preserve the old verification results. | |
518 BuildAndEvaluateSecTrustRef( | |
519 adjusted_cert_array, trust_policies, flags, trust_ref, trust_result, | |
520 verified_chain, chain_info); | |
521 } | |
522 | |
523 } // namespace | 466 } // namespace |
524 | 467 |
525 CertVerifyProcMac::CertVerifyProcMac() {} | 468 CertVerifyProcMac::CertVerifyProcMac() {} |
526 | 469 |
527 CertVerifyProcMac::~CertVerifyProcMac() {} | 470 CertVerifyProcMac::~CertVerifyProcMac() {} |
528 | 471 |
529 bool CertVerifyProcMac::SupportsAdditionalTrustAnchors() const { | 472 bool CertVerifyProcMac::SupportsAdditionalTrustAnchors() const { |
530 return false; | 473 return false; |
531 } | 474 } |
532 | 475 |
533 int CertVerifyProcMac::VerifyInternal( | 476 int CertVerifyProcMac::VerifyInternal( |
534 X509Certificate* cert, | 477 X509Certificate* cert, |
535 const std::string& hostname, | 478 const std::string& hostname, |
536 int flags, | 479 int flags, |
537 CRLSet* crl_set, | 480 CRLSet* crl_set, |
538 const CertificateList& additional_trust_anchors, | 481 const CertificateList& additional_trust_anchors, |
539 CertVerifyResult* verify_result) { | 482 CertVerifyResult* verify_result) { |
540 ScopedCFTypeRef<CFArrayRef> trust_policies; | 483 ScopedCFTypeRef<CFArrayRef> trust_policies; |
541 OSStatus status = CreateTrustPolicies(hostname, flags, &trust_policies); | 484 OSStatus status = CreateTrustPolicies(hostname, flags, &trust_policies); |
542 if (status) | 485 if (status) |
543 return NetErrorFromOSStatus(status); | 486 return NetErrorFromOSStatus(status); |
544 | 487 |
545 // Create and configure a SecTrustRef, which takes our certificate(s) | 488 // Create and configure a SecTrustRef, which takes our certificate(s) |
546 // and our SSL SecPolicyRef. SecTrustCreateWithCertificates() takes an | 489 // and our SSL SecPolicyRef. SecTrustCreateWithCertificates() takes an |
547 // array of certificates, the first of which is the certificate we're | 490 // array of certificates, the first of which is the certificate we're |
548 // verifying, and the subsequent (optional) certificates are used for | 491 // verifying, and the subsequent (optional) certificates are used for |
549 // chain building. | 492 // chain building. |
550 ScopedCFTypeRef<CFArrayRef> cert_array(cert->CreateOSCertChainForCert()); | 493 ScopedCFTypeRef<CFMutableArrayRef> cert_array(CFArrayCreateMutableCopy( |
494 kCFAllocatorDefault, 0, cert->CreateOSCertChainForCert())); | |
551 | 495 |
552 // Serialize all calls that may use the Keychain, to work around various | 496 // Serialize all calls that may use the Keychain, to work around various |
553 // issues in OS X 10.6+ with multi-threaded access to Security.framework. | 497 // issues in OS X 10.6+ with multi-threaded access to Security.framework. |
554 base::AutoLock lock(crypto::GetMacSecurityServicesLock()); | 498 base::AutoLock lock(crypto::GetMacSecurityServicesLock()); |
555 | 499 |
556 ScopedCFTypeRef<SecTrustRef> trust_ref; | 500 ScopedCFTypeRef<SecTrustRef> trust_ref; |
557 SecTrustResultType trust_result = kSecTrustResultDeny; | 501 SecTrustResultType trust_result = kSecTrustResultDeny; |
558 ScopedCFTypeRef<CFArrayRef> completed_chain; | 502 ScopedCFTypeRef<CFArrayRef> completed_chain; |
559 CSSM_TP_APPLE_EVIDENCE_INFO* chain_info = NULL; | 503 CSSM_TP_APPLE_EVIDENCE_INFO* chain_info = NULL; |
504 bool candidate_untrusted = true; | |
505 bool candidate_weak = false; | |
560 | 506 |
561 int rv = BuildAndEvaluateSecTrustRef( | 507 // OS X lacks proper path discovery; it will take the input certs and never |
562 cert_array, trust_policies, flags, &trust_ref, &trust_result, | 508 // backtrack the graph attempting to discover valid paths. |
563 &completed_chain, &chain_info); | 509 // This can create issues in some situations: |
564 if (rv != OK) | 510 // - When OS X changes the trust store, there may be a chain |
565 return rv; | 511 // A -> B -> C -> D |
566 if (trust_result != kSecTrustResultUnspecified && | 512 // where OS X trusts D (on some versions) and trusts C (on some versions). |
567 trust_result != kSecTrustResultProceed) { | 513 // If a server supplies a chain A, B, C (cross-signed by D), then this chain |
568 RetrySecTrustEvaluateWithAdjustedChain( | 514 // will successfully validate on systems that trust D, but fail for systems |
569 cert_array, trust_policies, flags, &trust_ref, &trust_result, | 515 // that trust C. If the server supplies a chain of A -> B, then it forces |
570 &completed_chain, &chain_info); | 516 // all clients to fetch C (via AIA) if they trust D, and not all clients |
517 // (notably, Firefox and Android) will do this, thus breaking them. | |
518 // An example of this is the Verizon Business Services root - GTE CyberTrust | |
519 // and Baltimore CyberTrust roots represent old and new roots that cause | |
520 // issues depending on which version of OS X being used. | |
521 // | |
522 // - OS X users may have installed an intermediate certificate that has | |
523 // expired. In this case, a non-expired version may be fetched via AIA, | |
524 // but depending on the chain sent by the server, this may not happen, | |
525 // causing validation to fail. | |
526 // An example of this is DigiCert, as described at | |
527 // https://blog.digicert.com/expired-intermediate-certificate/ | |
davidben
2015/02/02 22:13:55
So, this was an example of DigiCert being now in t
Ryan Sleevi
2015/02/02 22:36:01
If I recall correctly (and I sent out a ping to my
| |
528 // | |
529 // - When OS X trusts both C and D (simultaneously), it's possible that the | |
530 // version of C signed by D is signed using a weak algorithm (e.g. SHA-1), | |
531 // while the version of C in the trust store's signature doesn't matter. | |
532 // Since a 'strong' chain exists, it would be desirable to prefer this | |
533 // chain. | |
davidben
2015/02/02 22:13:54
I'm not sure I understand how this case relates to
Ryan Sleevi
2015/02/02 22:36:01
if I understood the question correctly -
If OS X t
davidben
2015/02/03 22:39:52
Okay. So this is another variant of the first exam
| |
534 // | |
535 // - A variant of the above example, it may be that the version of B sent by | |
536 // the server is signed using a weak algorithm, but the version of B | |
537 // present in the AIA of A is signed using a strong algorithm. Since a | |
538 // 'strong' chain exists, it would be desirable to prefer this chain. | |
539 // | |
540 // Because of this, the code below first attempts to validate the peer's | |
541 // identity using the supplied chain. If it is not trusted (e.g. the OS only | |
542 // trusts C, but the version of C signed by D was sent, and D is not trusted), | |
543 // or if it contains a weak chain, it will begin lopping off certificates | |
544 // from the end of the chain and attempting to verify. If a stronger, trusted | |
545 // chain is found, it is used, otherwise, the algorithm continues until only | |
546 // the peer's certificate remains. | |
davidben
2015/02/02 22:13:55
Safari's strategy is to chop off all but the leaf,
Ryan Sleevi
2015/02/02 22:36:00
Yup. Our unittest for GTE CyberTrust is an example
| |
547 // | |
548 // This does cause a performance hit for these users, but only in cases where | |
549 // OS X is building weaker chains than desired, or when it would otherwise | |
550 // fail the connection. | |
551 while ((candidate_untrusted || candidate_weak) && | |
552 CFArrayGetCount(cert_array) > 0) { | |
davidben
2015/02/02 22:13:54
Think it's worth UMA to measure how usage in the w
Ryan Sleevi
2015/02/02 22:36:01
Eh, once we have our own chain building, we could
| |
553 ScopedCFTypeRef<SecTrustRef> temp_ref; | |
554 SecTrustResultType temp_trust_result = kSecTrustResultDeny; | |
555 ScopedCFTypeRef<CFArrayRef> temp_chain; | |
556 CSSM_TP_APPLE_EVIDENCE_INFO* temp_chain_info = NULL; | |
557 | |
558 int rv = BuildAndEvaluateSecTrustRef(cert_array, trust_policies, flags, | |
559 &temp_ref, &temp_trust_result, | |
560 &temp_chain, &temp_chain_info); | |
561 if (rv != OK) | |
562 return rv; | |
davidben
2015/02/02 22:13:55
A network error in AIA chasing will cause this to
Ryan Sleevi
2015/02/02 22:36:01
No. rv would == OK, temp_trust_result == kSecTrust
| |
563 | |
564 CertVerifyResult temp_verify_result; | |
565 bool leaf_is_weak = false; | |
566 GetCertChainInfo(temp_chain, temp_chain_info, &temp_verify_result, | |
567 &leaf_is_weak); | |
568 | |
569 bool untrusted = (temp_trust_result != kSecTrustResultUnspecified && | |
davidben
2015/02/02 22:13:55
[Confirmed that we consider Proceed and Unspecifie
Ryan Sleevi
2015/02/02 22:36:01
https://developer.apple.com/library/mac/qa/qa1360/
| |
570 temp_trust_result != kSecTrustResultProceed); | |
571 bool weak_chain = | |
572 !leaf_is_weak && | |
573 (temp_verify_result.has_md2 || temp_verify_result.has_md4 || | |
574 temp_verify_result.has_md5 || temp_verify_result.has_sha1); | |
575 if (!trust_ref || (!untrusted && (candidate_untrusted || | |
576 (candidate_weak && !weak_chain)))) { | |
davidben
2015/02/02 22:13:54
This condition was slightly hard to follow. Not su
| |
577 trust_ref = temp_ref; | |
578 trust_result = temp_trust_result; | |
579 completed_chain = temp_chain; | |
580 chain_info = temp_chain_info; | |
581 | |
582 candidate_untrusted = untrusted; | |
583 candidate_weak = weak_chain; | |
584 } | |
585 if (!untrusted && !weak_chain) | |
davidben
2015/02/02 22:13:54
Isn't this redundant with the while loop condition
Ryan Sleevi
2015/02/02 22:36:01
Yeah. Just saves a CFArray operation. I originally
davidben
2015/02/03 22:39:52
Maybe remove the condition from the top, if you re
| |
586 break; | |
587 CFArrayRemoveValueAtIndex(cert_array, CFArrayGetCount(cert_array) - 1); | |
571 } | 588 } |
572 | 589 |
573 if (flags & CertVerifier::VERIFY_REV_CHECKING_ENABLED) | 590 if (flags & CertVerifier::VERIFY_REV_CHECKING_ENABLED) |
574 verify_result->cert_status |= CERT_STATUS_REV_CHECKING_ENABLED; | 591 verify_result->cert_status |= CERT_STATUS_REV_CHECKING_ENABLED; |
575 | 592 |
576 if (crl_set && !CheckRevocationWithCRLSet(completed_chain, crl_set)) | 593 if (crl_set && !CheckRevocationWithCRLSet(completed_chain, crl_set)) |
577 verify_result->cert_status |= CERT_STATUS_REVOKED; | 594 verify_result->cert_status |= CERT_STATUS_REVOKED; |
578 | 595 |
579 GetCertChainInfo(completed_chain, chain_info, verify_result); | 596 bool leaf_is_weak_unused = false; |
597 GetCertChainInfo(completed_chain, chain_info, verify_result, | |
598 &leaf_is_weak_unused); | |
580 | 599 |
581 // As of Security Update 2012-002/OS X 10.7.4, when an RSA key < 1024 bits | 600 // As of Security Update 2012-002/OS X 10.7.4, when an RSA key < 1024 bits |
582 // is encountered, CSSM returns CSSMERR_TP_VERIFY_ACTION_FAILED and adds | 601 // is encountered, CSSM returns CSSMERR_TP_VERIFY_ACTION_FAILED and adds |
583 // CSSMERR_CSP_UNSUPPORTED_KEY_SIZE as a certificate status. Avoid mapping | 602 // CSSMERR_CSP_UNSUPPORTED_KEY_SIZE as a certificate status. Avoid mapping |
584 // the CSSMERR_TP_VERIFY_ACTION_FAILED to CERT_STATUS_INVALID if the only | 603 // the CSSMERR_TP_VERIFY_ACTION_FAILED to CERT_STATUS_INVALID if the only |
585 // error was due to an unsupported key size. | 604 // error was due to an unsupported key size. |
586 bool policy_failed = false; | 605 bool policy_failed = false; |
587 bool weak_key_or_signature_algorithm = false; | 606 bool weak_key_or_signature_algorithm = false; |
588 | 607 |
589 // Evaluate the results | 608 // Evaluate the results |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
730 } | 749 } |
731 } | 750 } |
732 } | 751 } |
733 } | 752 } |
734 } | 753 } |
735 | 754 |
736 return OK; | 755 return OK; |
737 } | 756 } |
738 | 757 |
739 } // namespace net | 758 } // namespace net |
OLD | NEW |