Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(737)

Side by Side Diff: chromeos/attestation/attestation_flow.h

Issue 20873002: Added support for the content protection profile to AttestationFlow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/attestation/attestation_constants.cc ('k') | chromeos/attestation/attestation_flow.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ATTESTATION_ATTESTATION_FLOW_H_ 5 #ifndef CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_
6 #define CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_ 6 #define CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Gets an attestation certificate for a hardware-protected key. If a key for 62 // Gets an attestation certificate for a hardware-protected key. If a key for
63 // the given profile does not exist, it will be generated and a certificate 63 // the given profile does not exist, it will be generated and a certificate
64 // request will be made to the Chrome OS Privacy CA to issue a certificate for 64 // request will be made to the Chrome OS Privacy CA to issue a certificate for
65 // the key. If the key already exists and |force_new_key| is false, the 65 // the key. If the key already exists and |force_new_key| is false, the
66 // existing certificate is returned. 66 // existing certificate is returned.
67 // 67 //
68 // Parameters 68 // Parameters
69 // certificate_profile - Specifies what kind of certificate should be 69 // certificate_profile - Specifies what kind of certificate should be
70 // requested from the CA. 70 // requested from the CA.
71 // user_email - The canonical email address of the currently active user.
72 // This is ignored when not using the content protection
73 // profile.
74 // request_origin - For content protection profiles, certificate requests
75 // are origin-specific. This string must uniquely identify
76 // the origin of the request.
71 // force_new_key - If set to true, a new key will be generated even if a key 77 // force_new_key - If set to true, a new key will be generated even if a key
72 // already exists for the profile. The new key will replace 78 // already exists for the profile. The new key will replace
73 // the existing key on success. 79 // the existing key on success.
74 // callback - A callback which will be called when the operation completes. 80 // callback - A callback which will be called when the operation completes.
75 // On success |result| will be true and |data| will contain the 81 // On success |result| will be true and |data| will contain the
76 // PCA-issued certificate chain in PEM format. 82 // PCA-issued certificate chain in PEM format.
77 virtual void GetCertificate(AttestationCertificateProfile certificate_profile, 83 virtual void GetCertificate(AttestationCertificateProfile certificate_profile,
84 const std::string& user_email,
85 const std::string& request_origin,
78 bool force_new_key, 86 bool force_new_key,
79 const CertificateCallback& callback); 87 const CertificateCallback& callback);
80 88
81 private: 89 private:
82 // Asynchronously initiates the attestation enrollment flow. 90 // Asynchronously initiates the attestation enrollment flow.
83 // 91 //
84 // Parameters 92 // Parameters
85 // on_failure - Called if any failure occurs. 93 // on_failure - Called if any failure occurs.
86 // next_task - Called on successful enrollment. 94 // next_task - Called on successful enrollment.
87 void StartEnroll(const base::Closure& on_failure, 95 void StartEnroll(const base::Closure& on_failure,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const base::Closure& next_task, 135 const base::Closure& next_task,
128 bool success, 136 bool success,
129 cryptohome::MountError not_used); 137 cryptohome::MountError not_used);
130 138
131 // Asynchronously initiates the certificate request flow. Attestation 139 // Asynchronously initiates the certificate request flow. Attestation
132 // enrollment must complete successfully before this operation can succeed. 140 // enrollment must complete successfully before this operation can succeed.
133 // 141 //
134 // Parameters 142 // Parameters
135 // certificate_profile - Specifies what kind of certificate should be 143 // certificate_profile - Specifies what kind of certificate should be
136 // requested from the CA. 144 // requested from the CA.
145 // user_email - The active user's canonical email.
146 // request_origin - An identifier for the origin of this request.
137 // generate_new_key - If set to true a new key is generated. 147 // generate_new_key - If set to true a new key is generated.
138 // callback - Called when the operation completes. 148 // callback - Called when the operation completes.
139 void StartCertificateRequest( 149 void StartCertificateRequest(
140 const AttestationCertificateProfile certificate_profile, 150 const AttestationCertificateProfile certificate_profile,
151 const std::string& user_email,
152 const std::string& request_origin,
141 bool generate_new_key, 153 bool generate_new_key,
142 const CertificateCallback& callback); 154 const CertificateCallback& callback);
143 155
144 // Called when the attestation daemon has finished creating a certificate 156 // Called when the attestation daemon has finished creating a certificate
145 // request for the Privacy CA. The request is asynchronously forwarded as-is 157 // request for the Privacy CA. The request is asynchronously forwarded as-is
146 // to the PCA. 158 // to the PCA.
147 // 159 //
148 // Parameters 160 // Parameters
149 // key_type - The type of the key for which a certificate is requested. 161 // key_type - The type of the key for which a certificate is requested.
150 // key_name - The name of the key for which a certificate is requested. 162 // key_name - The name of the key for which a certificate is requested.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 201
190 base::WeakPtrFactory<AttestationFlow> weak_factory_; 202 base::WeakPtrFactory<AttestationFlow> weak_factory_;
191 203
192 DISALLOW_COPY_AND_ASSIGN(AttestationFlow); 204 DISALLOW_COPY_AND_ASSIGN(AttestationFlow);
193 }; 205 };
194 206
195 } // namespace attestation 207 } // namespace attestation
196 } // namespace chromeos 208 } // namespace chromeos
197 209
198 #endif // CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_ 210 #endif // CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_
OLDNEW
« no previous file with comments | « chromeos/attestation/attestation_constants.cc ('k') | chromeos/attestation/attestation_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698