| 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 "chromeos/attestation/attestation_flow.h" | 5 #include "chromeos/attestation/attestation_flow.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "chromeos/cryptohome/async_method_caller.h" | 10 #include "chromeos/cryptohome/async_method_caller.h" |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 if (!success) { | 257 if (!success) { |
| 258 LOG(ERROR) << "Attestation: Certificate request failed."; | 258 LOG(ERROR) << "Attestation: Certificate request failed."; |
| 259 if (!callback.is_null()) | 259 if (!callback.is_null()) |
| 260 callback.Run(false, ""); | 260 callback.Run(false, ""); |
| 261 return; | 261 return; |
| 262 } | 262 } |
| 263 | 263 |
| 264 // Forward the response to the attestation service to complete the operation. | 264 // Forward the response to the attestation service to complete the operation. |
| 265 async_caller_->AsyncTpmAttestationFinishCertRequest( | 265 async_caller_->AsyncTpmAttestationFinishCertRequest( |
| 266 data, key_type, cryptohome::Identification(account_id), key_name, | 266 data, key_type, cryptohome::Identification(account_id), key_name, |
| 267 base::Bind(callback)); | 267 callback); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void AttestationFlow::GetExistingCertificate( | 270 void AttestationFlow::GetExistingCertificate( |
| 271 AttestationKeyType key_type, | 271 AttestationKeyType key_type, |
| 272 const AccountId& account_id, | 272 const AccountId& account_id, |
| 273 const std::string& key_name, | 273 const std::string& key_name, |
| 274 const CertificateCallback& callback) { | 274 const CertificateCallback& callback) { |
| 275 cryptohome_client_->TpmAttestationGetCertificate( | 275 cryptohome_client_->TpmAttestationGetCertificate( |
| 276 key_type, cryptohome::Identification(account_id), key_name, | 276 key_type, cryptohome::Identification(account_id), key_name, |
| 277 base::Bind(&DBusDataMethodCallback, callback)); | 277 base::Bind(&DBusDataMethodCallback, callback)); |
| 278 } | 278 } |
| 279 | 279 |
| 280 ServerProxy::~ServerProxy() {} | 280 ServerProxy::~ServerProxy() {} |
| 281 | 281 |
| 282 PrivacyCAType ServerProxy::GetType() { | 282 PrivacyCAType ServerProxy::GetType() { |
| 283 return DEFAULT_PCA; | 283 return DEFAULT_PCA; |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace attestation | 286 } // namespace attestation |
| 287 } // namespace chromeos | 287 } // namespace chromeos |
| OLD | NEW |