OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/platform_keys/platform_keys.h" | 5 #include "chrome/browser/chromeos/platform_keys/platform_keys.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <cryptohi.h> | 8 #include <cryptohi.h> |
9 #include <keyhi.h> | 9 #include <keyhi.h> |
10 #include <secder.h> | 10 #include <secder.h> |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 544 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
545 state->CallBack(FROM_HERE, state->certs_.Pass(), | 545 state->CallBack(FROM_HERE, state->certs_.Pass(), |
546 std::string() /* no error */); | 546 std::string() /* no error */); |
547 } | 547 } |
548 | 548 |
549 // Continues selecting certificates on the IO thread. Used by | 549 // Continues selecting certificates on the IO thread. Used by |
550 // SelectClientCertificates(). | 550 // SelectClientCertificates(). |
551 void SelectCertificatesOnIOThread(scoped_ptr<SelectCertificatesState> state) { | 551 void SelectCertificatesOnIOThread(scoped_ptr<SelectCertificatesState> state) { |
552 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 552 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
553 state->cert_store_.reset(new net::ClientCertStoreChromeOS( | 553 state->cert_store_.reset(new net::ClientCertStoreChromeOS( |
| 554 net::CertificateList(), // no additional certificates |
554 make_scoped_ptr(new chromeos::ClientCertFilterChromeOS( | 555 make_scoped_ptr(new chromeos::ClientCertFilterChromeOS( |
555 state->use_system_key_slot_, state->username_hash_)), | 556 state->use_system_key_slot_, state->username_hash_)), |
556 net::ClientCertStoreChromeOS::PasswordDelegateFactory())); | 557 net::ClientCertStoreChromeOS::PasswordDelegateFactory())); |
557 | 558 |
558 state->certs_.reset(new net::CertificateList); | 559 state->certs_.reset(new net::CertificateList); |
559 | 560 |
560 SelectCertificatesState* state_ptr = state.get(); | 561 SelectCertificatesState* state_ptr = state.get(); |
561 state_ptr->cert_store_->GetClientCerts( | 562 state_ptr->cert_store_->GetClientCerts( |
562 *state_ptr->cert_request_info_, state_ptr->certs_.get(), | 563 *state_ptr->cert_request_info_, state_ptr->certs_.get(), |
563 base::Bind(&DidSelectCertificatesOnIOThread, base::Passed(&state))); | 564 base::Bind(&DidSelectCertificatesOnIOThread, base::Passed(&state))); |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 NSSOperationState* state_ptr = state.get(); | 894 NSSOperationState* state_ptr = state.get(); |
894 GetCertDatabase(std::string() /* don't get any specific slot */, | 895 GetCertDatabase(std::string() /* don't get any specific slot */, |
895 base::Bind(&GetTokensWithDB, base::Passed(&state)), | 896 base::Bind(&GetTokensWithDB, base::Passed(&state)), |
896 browser_context, | 897 browser_context, |
897 state_ptr); | 898 state_ptr); |
898 } | 899 } |
899 | 900 |
900 } // namespace platform_keys | 901 } // namespace platform_keys |
901 | 902 |
902 } // namespace chromeos | 903 } // namespace chromeos |
OLD | NEW |