| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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_builtin.h" | 5 #include "net/cert/cert_verify_proc_builtin.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #if defined(USE_NSS_CERTS) | 10 #if defined(USE_NSS_CERTS) |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 &verification_time)) { | 352 &verification_time)) { |
| 353 // This really shouldn't be possible unless Time::Now() returned | 353 // This really shouldn't be possible unless Time::Now() returned |
| 354 // something crazy. | 354 // something crazy. |
| 355 verify_result->cert_status |= CERT_STATUS_DATE_INVALID; | 355 verify_result->cert_status |= CERT_STATUS_DATE_INVALID; |
| 356 return; | 356 return; |
| 357 } | 357 } |
| 358 | 358 |
| 359 // Initialize the path builder. | 359 // Initialize the path builder. |
| 360 CertPathBuilder::Result result; | 360 CertPathBuilder::Result result; |
| 361 CertPathBuilder path_builder(target, trust_store->GetTrustStore(), | 361 CertPathBuilder path_builder(target, trust_store->GetTrustStore(), |
| 362 &signature_policy, verification_time, &result); | 362 &signature_policy, verification_time, |
| 363 KeyPurpose::SERVER_AUTH, &result); |
| 363 | 364 |
| 364 // Allow the path builder to discover intermediates from the trust store. | 365 // Allow the path builder to discover intermediates from the trust store. |
| 365 if (trust_store->GetCertIssuerSource()) | 366 if (trust_store->GetCertIssuerSource()) |
| 366 path_builder.AddCertIssuerSource(trust_store->GetCertIssuerSource()); | 367 path_builder.AddCertIssuerSource(trust_store->GetCertIssuerSource()); |
| 367 | 368 |
| 368 // Allow the path builder to discover the explicitly provided intermediates in | 369 // Allow the path builder to discover the explicitly provided intermediates in |
| 369 // |input_cert|. | 370 // |input_cert|. |
| 370 CertIssuerSourceStatic intermediates; | 371 CertIssuerSourceStatic intermediates; |
| 371 AddIntermediatesToIssuerSource(input_cert, &intermediates); | 372 AddIntermediatesToIssuerSource(input_cert, &intermediates); |
| 372 path_builder.AddCertIssuerSource(&intermediates); | 373 path_builder.AddCertIssuerSource(&intermediates); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 : OK; | 436 : OK; |
| 436 } | 437 } |
| 437 | 438 |
| 438 } // namespace | 439 } // namespace |
| 439 | 440 |
| 440 scoped_refptr<CertVerifyProc> CreateCertVerifyProcBuiltin() { | 441 scoped_refptr<CertVerifyProc> CreateCertVerifyProcBuiltin() { |
| 441 return scoped_refptr<CertVerifyProc>(new CertVerifyProcBuiltin()); | 442 return scoped_refptr<CertVerifyProc>(new CertVerifyProcBuiltin()); |
| 442 } | 443 } |
| 443 | 444 |
| 444 } // namespace net | 445 } // namespace net |
| OLD | NEW |