Clock consistency checks
[ Merge from http://go/wvgerrit/33440 ] Introduce checks to guard against clock tampering. Bug: 62037413 Test: WV unit, integration tests on angler Test: Manual clock rollback test Test: Playback testing (Netflix, Play movies) on sailfish Test: GTS test on angler Change-Id: I47938109adb5c0f5e9aefc58eb5dac156b9f16ef
This commit is contained in:
@@ -160,6 +160,9 @@ class PolicyEngine {
|
||||
// expiry time changes.
|
||||
void NotifyExpirationUpdate(int64_t current_time);
|
||||
|
||||
// Guard against clock rollbacks
|
||||
int64_t GetCurrentTime();
|
||||
|
||||
// set_clock() is for testing only. It alters ownership of the
|
||||
// passed-in pointer.
|
||||
void set_clock(Clock* clock);
|
||||
@@ -191,6 +194,9 @@ class PolicyEngine {
|
||||
// calculate the time where renewal retries should occur.
|
||||
int64_t next_renewal_time_;
|
||||
|
||||
// to assist in clock rollback checks
|
||||
int64_t last_recorded_current_time_;
|
||||
|
||||
// Used to dispatch CDM events.
|
||||
CdmSessionId session_id_;
|
||||
WvCdmEventListener* event_listener_;
|
||||
|
||||
Reference in New Issue
Block a user