| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/dbus/fake_cryptohome_client.h" | 5 #include "chromeos/dbus/fake_cryptohome_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 void FakeCryptohomeClient::AsyncCheckKey(const std::string& username, | 33 void FakeCryptohomeClient::AsyncCheckKey(const std::string& username, |
| 34 const std::string& key, | 34 const std::string& key, |
| 35 const AsyncMethodCallback& callback) { | 35 const AsyncMethodCallback& callback) { |
| 36 } | 36 } |
| 37 | 37 |
| 38 bool FakeCryptohomeClient::InstallAttributesIsInvalid(bool* is_invalid) { | 38 bool FakeCryptohomeClient::InstallAttributesIsInvalid(bool* is_invalid) { |
| 39 return false; | 39 return false; |
| 40 } | 40 } |
| 41 | 41 |
| 42 void FakeCryptohomeClient::TpmAttestationGetKeyPayload( | 42 void FakeCryptohomeClient::TpmAttestationGetKeyPayload( |
| 43 AttestationKeyType key_type, | 43 attestation::AttestationKeyType key_type, |
| 44 const std::string& key_name, | 44 const std::string& key_name, |
| 45 const DataMethodCallback& callback) { | 45 const DataMethodCallback& callback) { |
| 46 } | 46 } |
| 47 | 47 |
| 48 void FakeCryptohomeClient::AsyncTpmAttestationFinishCertRequest( | 48 void FakeCryptohomeClient::AsyncTpmAttestationFinishCertRequest( |
| 49 const std::string& pca_response, | 49 const std::string& pca_response, |
| 50 AttestationKeyType key_type, | 50 attestation::AttestationKeyType key_type, |
| 51 const std::string& key_name, | 51 const std::string& key_name, |
| 52 const AsyncMethodCallback& callback) { | 52 const AsyncMethodCallback& callback) { |
| 53 } | 53 } |
| 54 | 54 |
| 55 void FakeCryptohomeClient::TpmIsEnabled( | 55 void FakeCryptohomeClient::TpmIsEnabled( |
| 56 const BoolDBusMethodCallback& callback) { | 56 const BoolDBusMethodCallback& callback) { |
| 57 } | 57 } |
| 58 | 58 |
| 59 void FakeCryptohomeClient::AsyncTpmAttestationEnroll( | 59 void FakeCryptohomeClient::AsyncTpmAttestationEnroll( |
| 60 const std::string& pca_response, | 60 const std::string& pca_response, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 bool* successful) { | 134 bool* successful) { |
| 135 return false; | 135 return false; |
| 136 } | 136 } |
| 137 | 137 |
| 138 bool FakeCryptohomeClient::InstallAttributesIsFirstInstall( | 138 bool FakeCryptohomeClient::InstallAttributesIsFirstInstall( |
| 139 bool* is_first_install) { | 139 bool* is_first_install) { |
| 140 return false; | 140 return false; |
| 141 } | 141 } |
| 142 | 142 |
| 143 void FakeCryptohomeClient::TpmAttestationGetCertificate( | 143 void FakeCryptohomeClient::TpmAttestationGetCertificate( |
| 144 AttestationKeyType key_type, | 144 attestation::AttestationKeyType key_type, |
| 145 const std::string& key_name, | 145 const std::string& key_name, |
| 146 const DataMethodCallback& callback) { | 146 const DataMethodCallback& callback) { |
| 147 } | 147 } |
| 148 | 148 |
| 149 void FakeCryptohomeClient::InstallAttributesIsReady( | 149 void FakeCryptohomeClient::InstallAttributesIsReady( |
| 150 const BoolDBusMethodCallback& callback) { | 150 const BoolDBusMethodCallback& callback) { |
| 151 MessageLoop::current()->PostTask(FROM_HERE, | 151 MessageLoop::current()->PostTask(FROM_HERE, |
| 152 base::Bind(callback, | 152 base::Bind(callback, |
| 153 DBUS_METHOD_CALL_SUCCESS, true)); | 153 DBUS_METHOD_CALL_SUCCESS, true)); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void FakeCryptohomeClient::TpmAttestationGetPublicKey( | 156 void FakeCryptohomeClient::TpmAttestationGetPublicKey( |
| 157 AttestationKeyType key_type, | 157 attestation::AttestationKeyType key_type, |
| 158 const std::string& key_name, | 158 const std::string& key_name, |
| 159 const DataMethodCallback& callback) { | 159 const DataMethodCallback& callback) { |
| 160 } | 160 } |
| 161 | 161 |
| 162 void FakeCryptohomeClient::TpmAttestationSignSimpleChallenge( | 162 void FakeCryptohomeClient::TpmAttestationSignSimpleChallenge( |
| 163 AttestationKeyType key_type, | 163 attestation::AttestationKeyType key_type, |
| 164 const std::string& key_name, | 164 const std::string& key_name, |
| 165 const std::string& challenge, | 165 const std::string& challenge, |
| 166 const AsyncMethodCallback& callback) { | 166 const AsyncMethodCallback& callback) { |
| 167 } | 167 } |
| 168 | 168 |
| 169 void FakeCryptohomeClient::Pkcs11GetTpmTokenInfo( | 169 void FakeCryptohomeClient::Pkcs11GetTpmTokenInfo( |
| 170 const Pkcs11GetTpmTokenInfoCallback& callback) { | 170 const Pkcs11GetTpmTokenInfoCallback& callback) { |
| 171 } | 171 } |
| 172 | 172 |
| 173 void FakeCryptohomeClient::TpmIsOwned(const BoolDBusMethodCallback& callback) { | 173 void FakeCryptohomeClient::TpmIsOwned(const BoolDBusMethodCallback& callback) { |
| 174 } | 174 } |
| 175 | 175 |
| 176 void FakeCryptohomeClient::TpmAttestationIsPrepared( | 176 void FakeCryptohomeClient::TpmAttestationIsPrepared( |
| 177 const BoolDBusMethodCallback& callback) { | 177 const BoolDBusMethodCallback& callback) { |
| 178 } | 178 } |
| 179 | 179 |
| 180 void FakeCryptohomeClient::TpmIsReady(const BoolDBusMethodCallback& callback) { | 180 void FakeCryptohomeClient::TpmIsReady(const BoolDBusMethodCallback& callback) { |
| 181 } | 181 } |
| 182 | 182 |
| 183 void FakeCryptohomeClient::AsyncTpmAttestationCreateEnrollRequest( | 183 void FakeCryptohomeClient::AsyncTpmAttestationCreateEnrollRequest( |
| 184 const AsyncMethodCallback& callback) { | 184 const AsyncMethodCallback& callback) { |
| 185 } | 185 } |
| 186 | 186 |
| 187 void FakeCryptohomeClient::ResetAsyncCallStatusHandlers() { | 187 void FakeCryptohomeClient::ResetAsyncCallStatusHandlers() { |
| 188 } | 188 } |
| 189 | 189 |
| 190 void FakeCryptohomeClient::TpmAttestationDoesKeyExist( | 190 void FakeCryptohomeClient::TpmAttestationDoesKeyExist( |
| 191 AttestationKeyType key_type, | 191 attestation::AttestationKeyType key_type, |
| 192 const std::string& key_name, | 192 const std::string& key_name, |
| 193 const BoolDBusMethodCallback& callback) { | 193 const BoolDBusMethodCallback& callback) { |
| 194 } | 194 } |
| 195 | 195 |
| 196 bool FakeCryptohomeClient::CallTpmIsOwnedAndBlock(bool* owned) { | 196 bool FakeCryptohomeClient::CallTpmIsOwnedAndBlock(bool* owned) { |
| 197 return false; | 197 return false; |
| 198 } | 198 } |
| 199 | 199 |
| 200 void FakeCryptohomeClient::AsyncRemove(const std::string& username, | 200 void FakeCryptohomeClient::AsyncRemove(const std::string& username, |
| 201 const AsyncMethodCallback& callback) { | 201 const AsyncMethodCallback& callback) { |
| 202 } | 202 } |
| 203 | 203 |
| 204 void FakeCryptohomeClient::TpmAttestationSetKeyPayload( | 204 void FakeCryptohomeClient::TpmAttestationSetKeyPayload( |
| 205 AttestationKeyType key_type, | 205 attestation::AttestationKeyType key_type, |
| 206 const std::string& key_name, | 206 const std::string& key_name, |
| 207 const std::string& payload, | 207 const std::string& payload, |
| 208 const BoolDBusMethodCallback& callback) { | 208 const BoolDBusMethodCallback& callback) { |
| 209 } | 209 } |
| 210 | 210 |
| 211 void FakeCryptohomeClient::GetSanitizedUsername( | 211 void FakeCryptohomeClient::GetSanitizedUsername( |
| 212 const std::string& username, | 212 const std::string& username, |
| 213 const StringDBusMethodCallback& callback) { | 213 const StringDBusMethodCallback& callback) { |
| 214 } | 214 } |
| 215 | 215 |
| 216 void FakeCryptohomeClient::TpmAttestationSignEnterpriseChallenge( | 216 void FakeCryptohomeClient::TpmAttestationSignEnterpriseChallenge( |
| 217 AttestationKeyType key_type, | 217 attestation::AttestationKeyType key_type, |
| 218 const std::string& key_name, | 218 const std::string& key_name, |
| 219 const std::string& domain, | 219 const std::string& domain, |
| 220 const std::string& device_id, | 220 const std::string& device_id, |
| 221 AttestationChallengeOptions options, | 221 attestation::AttestationChallengeOptions options, |
| 222 const std::string& challenge, | 222 const std::string& challenge, |
| 223 const AsyncMethodCallback& callback) { | 223 const AsyncMethodCallback& callback) { |
| 224 } | 224 } |
| 225 | 225 |
| 226 void FakeCryptohomeClient::TpmAttestationIsEnrolled( | 226 void FakeCryptohomeClient::TpmAttestationIsEnrolled( |
| 227 const BoolDBusMethodCallback& callback) { | 227 const BoolDBusMethodCallback& callback) { |
| 228 } | 228 } |
| 229 | 229 |
| 230 void FakeCryptohomeClient::TpmAttestationRegisterKey( | 230 void FakeCryptohomeClient::TpmAttestationRegisterKey( |
| 231 AttestationKeyType key_type, | 231 attestation::AttestationKeyType key_type, |
| 232 const std::string& key_name, | 232 const std::string& key_name, |
| 233 const AsyncMethodCallback& callback) { | 233 const AsyncMethodCallback& callback) { |
| 234 } | 234 } |
| 235 | 235 |
| 236 bool FakeCryptohomeClient::CallTpmClearStoredPasswordAndBlock() { | 236 bool FakeCryptohomeClient::CallTpmClearStoredPasswordAndBlock() { |
| 237 return false; | 237 return false; |
| 238 } | 238 } |
| 239 | 239 |
| 240 void FakeCryptohomeClient::AsyncTpmAttestationCreateCertRequest( | 240 void FakeCryptohomeClient::AsyncTpmAttestationCreateCertRequest( |
| 241 int options, | 241 int options, |
| 242 const AsyncMethodCallback& callback) { | 242 const AsyncMethodCallback& callback) { |
| 243 } | 243 } |
| 244 | 244 |
| 245 } // namespace chromeos | 245 } // namespace chromeos |
| OLD | NEW |