Part of Qualcomm L1 OEMCrypto integration

Upgrade to version 2.1 of license protocol in OEMCrypto.

related-to-bug: 8621521

Merge of https://widevine-internal-review.googlesource.com/#/c/4952/
from Widevine CDM repository to android repository.

Change-Id: I0d85dae1981b7525ab17aec5f21cf668d078bf47
This commit is contained in:
Fred Gylys-Colwell
2013-04-22 13:07:34 -07:00
committed by Jeff Tinker
parent bb0c62768a
commit 39ea1df671
14 changed files with 2036 additions and 1389 deletions

View File

@@ -23,7 +23,19 @@ bool KeyControlBlock::Validate() {
0x6b63746c);
return false;
}
// TODO(gmorgan): validate control bits
if (refresh_) {
if (control_bits_ & kControlObserveDataPath) {
LOGW("KCB: data_path_type set for refresh.");
}
if (control_bits_ & kControlObserveHDCP) {
LOGW("KCB: HDCP setting set for refresh.");
}
if (control_bits_ & kControlObserveCGMS) {
LOGW("KCB: CGMS setting set for refresh.");
}
}
valid_ = true;
return valid_;
}
@@ -103,4 +115,21 @@ bool Key::setControl(const KeyControlBlock& control) {
return valid_;
}
bool Key::UpdateDuration(const KeyControlBlock& control) {
valid_ = false;
if (!control.valid() || !has_control_) {
LOGE("UpdateDuration: control block not valid.");
return false;
}
control_.set_duration(control.duration());
if (isValidType() && !value_.empty()) {
valid_ = true;
} else {
LOGE("UpdateDuration: value or type bad.");
}
return valid_;
}
}; // namespace wvoec_eng