Update includes and BUILD
This commit is contained in:
@@ -21,25 +21,6 @@
|
||||
|
||||
namespace widevine {
|
||||
|
||||
bool IsRotIdRevoked(const std::string& encrypted_unique_id, uint32_t system_id,
|
||||
const std::string& rot_id_hash,
|
||||
const std::vector<std::string>& revoked_ids) {
|
||||
// This could conceivably happen for legacy DRM certificates without a ROT id.
|
||||
// No need to match if there's nothing to match against.
|
||||
if (encrypted_unique_id.empty() || rot_id_hash.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto& revoked_id : revoked_ids) {
|
||||
std::string revoked_hash =
|
||||
GenerateRotIdHash(encrypted_unique_id, system_id, revoked_id);
|
||||
if (rot_id_hash == revoked_hash) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string GenerateRotIdHash(const std::string& salt, uint32_t system_id,
|
||||
const std::string& unique_id_hash) {
|
||||
if (salt.empty() || unique_id_hash.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user