Merge "Disable expiration for legacy DRM certificates" into sc-dev
This commit is contained in:
@@ -96,7 +96,8 @@ const char kUsageInfoFileNameExt[] = ".bin";
|
||||
const char kUsageInfoFileNamePrefix[] = "usage";
|
||||
const char kUsageTableFileName[] = "usgtable.bin";
|
||||
const char kWildcard[] = "*";
|
||||
constexpr int64_t kFourMonthsInSeconds = (2 * 30 + 2 * 31) * 24 * 60 * 60;
|
||||
// TODO(b/192430982): Renable expiration of legacy DRM certificates
|
||||
// constexpr int64_t kFourMonthsInSeconds = (2 * 30 + 2 * 31) * 24 * 60 * 60;
|
||||
|
||||
// Helper methods
|
||||
bool SetDeviceCertificate(const std::string& certificate,
|
||||
@@ -427,7 +428,9 @@ bool DeviceFiles::StoreCertificate(const std::string& certificate,
|
||||
if (default_certificate) {
|
||||
Clock clock;
|
||||
device_certificate->set_acquisition_time_seconds(clock.GetCurrentTime());
|
||||
} else {
|
||||
}
|
||||
/* TODO(b/192430982): Renable expiration of legacy DRM certificates
|
||||
else {
|
||||
// Since certificates of type kCertificateAtsc are not allowed to be
|
||||
// stored, this is a certificate of type kCertificateLegacy.
|
||||
// The only time when a legacy certificate is stored is when it does not
|
||||
@@ -440,6 +443,7 @@ bool DeviceFiles::StoreCertificate(const std::string& certificate,
|
||||
current_time + kFourMonthsInSeconds +
|
||||
rng.RandomInRange(kFourMonthsInSeconds));
|
||||
}
|
||||
*/
|
||||
|
||||
std::string serialized_file;
|
||||
file.SerializeToString(&serialized_file);
|
||||
@@ -595,6 +599,7 @@ DeviceFiles::CertificateState DeviceFiles::RetrieveCertificate(
|
||||
}
|
||||
|
||||
case kCertificateLegacy: {
|
||||
/* TODO(b/192430982): Renable expiration of legacy DRM certificates
|
||||
// Validation check for DRM certificate without an expiration
|
||||
// time set by the provisioning service. Add an expiry time
|
||||
// within the next 6 months +/- 2 months, if one has not been set.
|
||||
@@ -611,6 +616,7 @@ DeviceFiles::CertificateState DeviceFiles::RetrieveCertificate(
|
||||
}
|
||||
|
||||
if (current_time > expiration_time_seconds) return kCertificateExpired;
|
||||
*/
|
||||
|
||||
return kCertificateValid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user