Fix SRM Version in mock
Merge from Widevine repo of http://go/wvgerrit/26522 The modifiable OEMCrypto mock did not use the correct initial SRM version as specified in the options file. This CL fixes that. b/37713658 Change-Id: I5ab5f5549dd7815edd4a3d69b804440faedeb657
This commit is contained in:
@@ -410,17 +410,18 @@ OEMCryptoResult SessionContext::LoadKeys(
|
||||
uint32_t minimum_version =
|
||||
htonl(*reinterpret_cast<const uint32_t*>(srm_requirement + 8));
|
||||
uint16_t current_version = 0;
|
||||
if (OEMCrypto_SUCCESS == ce_->current_srm_version(¤t_version) &&
|
||||
current_version >= minimum_version) {
|
||||
srm_requirements_status_ = ValidSRMVersion;
|
||||
if (ce_->srm_blacklisted_device_attached()) {
|
||||
LOGW("[LoadKeys: SRM blacklisted device attached]");
|
||||
srm_requirements_status_ = InvalidSRMVersion;
|
||||
}
|
||||
} else {
|
||||
LOGW("[LoadKeys: SRM Version too small %d, required: %d",
|
||||
if (OEMCrypto_SUCCESS != ce_->current_srm_version(¤t_version)) {
|
||||
LOGW("[LoadKeys: SRM Version not available.");
|
||||
srm_requirements_status_ = InvalidSRMVersion;
|
||||
} else if (current_version < minimum_version) {
|
||||
LOGW("[LoadKeys: SRM Version is too small %d, required: %d",
|
||||
current_version, minimum_version);
|
||||
srm_requirements_status_ = InvalidSRMVersion;
|
||||
} else if (ce_->srm_blacklisted_device_attached()) {
|
||||
LOGW("[LoadKeys: SRM blacklisted device attached]");
|
||||
srm_requirements_status_ = InvalidSRMVersion;
|
||||
} else {
|
||||
srm_requirements_status_ = ValidSRMVersion;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user