am 6dbc3749: Merge "Validate Service Certificates Before Accepting Them" into mnc-dev

* commit '6dbc3749b08226f4aea4cd5500db82a792095d6d':
  Validate Service Certificates Before Accepting Them
This commit is contained in:
John "Juce" Bruce
2015-06-12 20:21:58 +00:00
committed by Android Git Automerger
5 changed files with 36 additions and 14 deletions

View File

@@ -585,7 +585,11 @@ status_t WVDrmPlugin::setPropertyByteArray(const String8& name,
const Vector<uint8_t>& value) {
if (name == "serviceCertificate") {
std::string cert(value.begin(), value.end());
mPropertySet.set_service_certificate(cert);
if (WvContentDecryptionModule::IsValidServiceCertificate(cert)) {
mPropertySet.set_service_certificate(cert);
} else {
return android::BAD_VALUE;
}
} else {
ALOGE("App set unknown byte array property %s", name.string());
return android::ERROR_DRM_CANNOT_HANDLE;