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 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 | 56 |
57 // Checks attestation policy and starts any necessary work. | 57 // Checks attestation policy and starts any necessary work. |
58 void Start(); | 58 void Start(); |
59 | 59 |
60 // Gets a new certificate for the Enterprise Machine Key (EMK). | 60 // Gets a new certificate for the Enterprise Machine Key (EMK). |
61 void GetNewCertificate(); | 61 void GetNewCertificate(); |
62 | 62 |
63 // Gets the existing EMK certificate and sends it to CheckCertificateExpiry. | 63 // Gets the existing EMK certificate and sends it to CheckCertificateExpiry. |
64 void GetExistingCertificate(); | 64 void GetExistingCertificate(); |
65 | 65 |
66 // Checks if the given certificate is expired and, if so, get a new one. | 66 // Checks if the given certificate is expired and, if so, gets a new one. The |
67 // certificate data is assumed to actually be a chain of certificates in PEM | |
68 // format. All certificates in the chain are checked for expiry. | |
67 void CheckCertificateExpiry(const std::string& certificate); | 69 void CheckCertificateExpiry(const std::string& certificate); |
Mattias Nissler (ping if slow)
2015/12/10 08:08:40
nit: Please update the variable name to reflect th
| |
68 | 70 |
69 // Uploads a certificate to the policy server. | 71 // Uploads a certificate to the policy server. |
70 void UploadCertificate(const std::string& certificate); | 72 void UploadCertificate(const std::string& certificate); |
71 | 73 |
72 // Checks if a certificate has already been uploaded and, if not, upload. | 74 // Checks if a certificate has already been uploaded and, if not, upload. |
73 void CheckIfUploaded(const std::string& certificate, | 75 void CheckIfUploaded(const std::string& certificate, |
74 const std::string& key_payload); | 76 const std::string& key_payload); |
75 | 77 |
76 // Gets the payload associated with the EMK and sends it to |callback|. | 78 // Gets the payload associated with the EMK and sends it to |callback|. |
77 void GetKeyPayload(base::Callback<void(const std::string&)> callback); | 79 void GetKeyPayload(base::Callback<void(const std::string&)> callback); |
(...skipping 24 matching lines...) Expand all Loading... | |
102 // invalidate the weak pointers before any other members are destroyed. | 104 // invalidate the weak pointers before any other members are destroyed. |
103 base::WeakPtrFactory<AttestationPolicyObserver> weak_factory_; | 105 base::WeakPtrFactory<AttestationPolicyObserver> weak_factory_; |
104 | 106 |
105 DISALLOW_COPY_AND_ASSIGN(AttestationPolicyObserver); | 107 DISALLOW_COPY_AND_ASSIGN(AttestationPolicyObserver); |
106 }; | 108 }; |
107 | 109 |
108 } // namespace attestation | 110 } // namespace attestation |
109 } // namespace chromeos | 111 } // namespace chromeos |
110 | 112 |
111 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ | 113 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ |
OLD | NEW |