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

Side by Side Diff: chrome/browser/chromeos/attestation/attestation_policy_observer.h

Issue 1511793004: attestation: Fix policy observer expiry check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/attestation/attestation_policy_observer.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) 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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/attestation/attestation_policy_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698