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 #ifndef CHROMEOS_CRYPTOHOME_ASYNC_METHOD_CALLER_H_ | 5 #ifndef CHROMEOS_CRYPTOHOME_ASYNC_METHOD_CALLER_H_ |
6 #define CHROMEOS_CRYPTOHOME_ASYNC_METHOD_CALLER_H_ | 6 #define CHROMEOS_CRYPTOHOME_ASYNC_METHOD_CALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 chromeos::attestation::AttestationCertificateProfile certificate_profile, | 123 chromeos::attestation::AttestationCertificateProfile certificate_profile, |
124 const std::string& user_email, | 124 const std::string& user_email, |
125 const std::string& request_origin, | 125 const std::string& request_origin, |
126 const DataCallback& callback) = 0; | 126 const DataCallback& callback) = 0; |
127 | 127 |
128 // Asks cryptohomed to asynchronously finish an attestation certificate | 128 // Asks cryptohomed to asynchronously finish an attestation certificate |
129 // request. On success the data sent to |callback| is a certificate chain | 129 // request. On success the data sent to |callback| is a certificate chain |
130 // in PEM format. |pca_response| is the response to the certificate request | 130 // in PEM format. |pca_response| is the response to the certificate request |
131 // emitted by the Privacy CA. |key_type| determines whether the certified key | 131 // emitted by the Privacy CA. |key_type| determines whether the certified key |
132 // is to be associated with the current user. |key_name| is a name for the | 132 // is to be associated with the current user. |key_name| is a name for the |
133 // key. | 133 // key. If |key_type| is KEY_USER, the user's canonical email address must be |
134 // provided in |user_email|. Otherwise |user_email| is ignored. | |
134 virtual void AsyncTpmAttestationFinishCertRequest( | 135 virtual void AsyncTpmAttestationFinishCertRequest( |
135 const std::string& pca_response, | 136 const std::string& pca_response, |
136 chromeos::attestation::AttestationKeyType key_type, | 137 chromeos::attestation::AttestationKeyType key_type, |
138 const std::string& user_email, | |
bartfab (slow)
2013/10/13 16:31:35
As in the other files, please use user_id.
Darren Krahn
2013/10/15 16:49:06
Done.
| |
137 const std::string& key_name, | 139 const std::string& key_name, |
138 const DataCallback& callback) = 0; | 140 const DataCallback& callback) = 0; |
139 | 141 |
140 // Asks cryptohomed to asynchronously register the attestation key specified | 142 // Asks cryptohomed to asynchronously register the attestation key specified |
141 // by |key_type| and |key_name|. | 143 // by |key_type| and |key_name|. If |key_type| is KEY_USER, the user's |
144 // canonical email address must be provided in |user_email|. Otherwise | |
145 // |user_email| is ignored. | |
142 virtual void TpmAttestationRegisterKey( | 146 virtual void TpmAttestationRegisterKey( |
143 chromeos::attestation::AttestationKeyType key_type, | 147 chromeos::attestation::AttestationKeyType key_type, |
148 const std::string& user_email, | |
144 const std::string& key_name, | 149 const std::string& key_name, |
145 const Callback& callback) = 0; | 150 const Callback& callback) = 0; |
146 | 151 |
147 // Asks cryptohomed to asynchronously sign an enterprise challenge with the | 152 // Asks cryptohomed to asynchronously sign an enterprise challenge with the |
148 // key specified by |key_type| and |key_name|. The |domain| and |device_id| | 153 // key specified by |key_type| and |key_name|. The |domain| and |device_id| |
149 // parameters will be included in the challenge response. |challenge| must be | 154 // parameters will be included in the challenge response. |challenge| must be |
150 // a valid enterprise challenge. On success, the data sent to |callback| is | 155 // a valid enterprise challenge. On success, the data sent to |callback| is |
151 // the challenge response. | 156 // the challenge response. If |key_type| is KEY_USER, the user's canonical |
157 // email address must be provided in |user_email|. Otherwise |user_email| is | |
158 // ignored. | |
152 virtual void TpmAttestationSignEnterpriseChallenge( | 159 virtual void TpmAttestationSignEnterpriseChallenge( |
153 chromeos::attestation::AttestationKeyType key_type, | 160 chromeos::attestation::AttestationKeyType key_type, |
161 const std::string& user_email, | |
154 const std::string& key_name, | 162 const std::string& key_name, |
155 const std::string& domain, | 163 const std::string& domain, |
156 const std::string& device_id, | 164 const std::string& device_id, |
157 chromeos::attestation::AttestationChallengeOptions options, | 165 chromeos::attestation::AttestationChallengeOptions options, |
158 const std::string& challenge, | 166 const std::string& challenge, |
159 const DataCallback& callback) = 0; | 167 const DataCallback& callback) = 0; |
160 | 168 |
161 // Asks cryptohomed to asynchronously sign a simple challenge with the key | 169 // Asks cryptohomed to asynchronously sign a simple challenge with the key |
162 // specified by |key_type| and |key_name|. |challenge| can be any arbitrary | 170 // specified by |key_type| and |key_name|. |challenge| can be any arbitrary |
163 // set of bytes. On success, the data sent to |callback| is the challenge | 171 // set of bytes. On success, the data sent to |callback| is the challenge |
164 // response. | 172 // response. If |key_type| is KEY_USER, the user's canonical email address |
173 // must be provided in |user_email|. Otherwise |user_email| is ignored. | |
165 virtual void TpmAttestationSignSimpleChallenge( | 174 virtual void TpmAttestationSignSimpleChallenge( |
166 chromeos::attestation::AttestationKeyType key_type, | 175 chromeos::attestation::AttestationKeyType key_type, |
176 const std::string& user_email, | |
167 const std::string& key_name, | 177 const std::string& key_name, |
168 const std::string& challenge, | 178 const std::string& challenge, |
169 const DataCallback& callback) = 0; | 179 const DataCallback& callback) = 0; |
170 | 180 |
171 // Asks cryptohome to asynchronously retrieve a string associated with given | 181 // Asks cryptohome to asynchronously retrieve a string associated with given |
172 // |user| that would be used in mount path instead of |user|. | 182 // |user| that would be used in mount path instead of |user|. |
173 // On success the data is sent to |callback|. | 183 // On success the data is sent to |callback|. |
174 virtual void AsyncGetSanitizedUsername( | 184 virtual void AsyncGetSanitizedUsername( |
175 const std::string& user, | 185 const std::string& user, |
176 const DataCallback& callback) = 0; | 186 const DataCallback& callback) = 0; |
(...skipping 11 matching lines...) Expand all Loading... | |
188 static void Shutdown(); | 198 static void Shutdown(); |
189 | 199 |
190 // Returns a pointer to the global AsyncMethodCaller instance. | 200 // Returns a pointer to the global AsyncMethodCaller instance. |
191 // Initialize() should already have been called. | 201 // Initialize() should already have been called. |
192 static AsyncMethodCaller* GetInstance(); | 202 static AsyncMethodCaller* GetInstance(); |
193 }; | 203 }; |
194 | 204 |
195 } // namespace cryptohome | 205 } // namespace cryptohome |
196 | 206 |
197 #endif // CHROMEOS_CRYPTOHOME_ASYNC_METHOD_CALLER_H_ | 207 #endif // CHROMEOS_CRYPTOHOME_ASYNC_METHOD_CALLER_H_ |
OLD | NEW |