Chromium Code Reviews| 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_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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 // DBusThreadManager::Get().GetCryptohomeClient(), | 50 // DBusThreadManager::Get().GetCryptohomeClient(), |
| 51 // std::move(my_server_proxy)); | 51 // std::move(my_server_proxy)); |
| 52 // AttestationFlow::CertificateCallback callback = base::Bind(&MyCallback); | 52 // AttestationFlow::CertificateCallback callback = base::Bind(&MyCallback); |
| 53 // flow.GetCertificate(ENTERPRISE_USER_CERTIFICATE, false, callback); | 53 // flow.GetCertificate(ENTERPRISE_USER_CERTIFICATE, false, callback); |
| 54 class CHROMEOS_EXPORT AttestationFlow { | 54 class CHROMEOS_EXPORT AttestationFlow { |
| 55 public: | 55 public: |
| 56 typedef base::Callback<void(bool success, | 56 typedef base::Callback<void(bool success, |
| 57 const std::string& pem_certificate_chain)> | 57 const std::string& pem_certificate_chain)> |
| 58 CertificateCallback; | 58 CertificateCallback; |
| 59 | 59 |
| 60 static AttestationKeyType GetKeyTypeForProfile( | |
|
pastarmovj
2016/08/22 15:09:43
If those are becoming public now, please document
The one and only Dr. Crash
2016/08/22 16:00:01
Done.
| |
| 61 AttestationCertificateProfile profile); | |
| 62 static std::string GetKeyNameForProfile(AttestationCertificateProfile profile, | |
| 63 const std::string& origin); | |
| 64 | |
| 60 AttestationFlow(cryptohome::AsyncMethodCaller* async_caller, | 65 AttestationFlow(cryptohome::AsyncMethodCaller* async_caller, |
| 61 CryptohomeClient* cryptohome_client, | 66 CryptohomeClient* cryptohome_client, |
| 62 std::unique_ptr<ServerProxy> server_proxy); | 67 std::unique_ptr<ServerProxy> server_proxy); |
| 63 virtual ~AttestationFlow(); | 68 virtual ~AttestationFlow(); |
| 64 | 69 |
| 65 // Gets an attestation certificate for a hardware-protected key. If a key for | 70 // Gets an attestation certificate for a hardware-protected key. If a key for |
| 66 // the given profile does not exist, it will be generated and a certificate | 71 // the given profile does not exist, it will be generated and a certificate |
| 67 // request will be made to the Chrome OS Privacy CA to issue a certificate for | 72 // request will be made to the Chrome OS Privacy CA to issue a certificate for |
| 68 // the key. If the key already exists and |force_new_key| is false, the | 73 // the key. If the key already exists and |force_new_key| is false, the |
| 69 // existing certificate is returned. | 74 // existing certificate is returned. |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 | 214 |
| 210 base::WeakPtrFactory<AttestationFlow> weak_factory_; | 215 base::WeakPtrFactory<AttestationFlow> weak_factory_; |
| 211 | 216 |
| 212 DISALLOW_COPY_AND_ASSIGN(AttestationFlow); | 217 DISALLOW_COPY_AND_ASSIGN(AttestationFlow); |
| 213 }; | 218 }; |
| 214 | 219 |
| 215 } // namespace attestation | 220 } // namespace attestation |
| 216 } // namespace chromeos | 221 } // namespace chromeos |
| 217 | 222 |
| 218 #endif // CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_ | 223 #endif // CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_ |
| OLD | NEW |